diff --git a/.github/workflows/e2e-master.yaml b/.github/workflows/e2e-master.yaml
index 89f0bec960..5819a0d796 100644
--- a/.github/workflows/e2e-master.yaml
+++ b/.github/workflows/e2e-master.yaml
@@ -38,7 +38,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r test-requirements.txt
+ python -m pip install -r requirements-asyncio.txt
+ python -m pip install -r test-requirements-asyncio.txt
- name: Install package
run: python -m pip install -e .
- name: Run End to End tests
- run: pytest -vvv -s kubernetes/e2e_test
+ run: pytest -vvv -s kubernetes/e2e_test -s kubernetes_asyncio/e2e_test
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 4075a03e07..3af2c58df3 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -24,6 +24,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
+ pip install -r requirements-asyncio.txt
- name: Lint with flake8
run: |
pip install flake8
diff --git a/examples_asyncio/in_cluster_config.py b/examples_asyncio/in_cluster_config.py
new file mode 100644
index 0000000000..5036032368
--- /dev/null
+++ b/examples_asyncio/in_cluster_config.py
@@ -0,0 +1,86 @@
+# Copyright 2017 The Kubernetes Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Simple example to show loading config from the cluster
+
+#
+# If you get 403 errors from API server you will have to configure
+# RBAC to add necessay permissions.
+#
+# ---
+# kind: ClusterRole
+# apiVersion: rbac.authorization.k8s.io/v1
+# metadata:
+# name: pods-list
+# rules:
+# - apiGroups: [""]
+# resources: ["pods"]
+# verbs: ["list"]
+# ---
+# kind: ClusterRoleBinding
+# apiVersion: rbac.authorization.k8s.io/v1
+# metadata:
+# name: pods-list
+# subjects:
+# - kind: ServiceAccount
+# name: default
+# namespace: default
+# roleRef:
+# kind: ClusterRole
+# name: pods-list
+# apiGroup: rbac.authorization.k8s.io
+# ---
+#
+# Doc: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
+#
+# This example can be run from the image: https://hub.docker.com/r/tpimages/kubernetes_asyncio_examples/
+#
+# $ kubectl run kubernetes-asyncio-examples --image tpimages/kubernetes_asyncio_examples
+#
+
+import asyncio
+import sys
+import traceback
+
+from kubernetes_asyncio import client, config
+
+
+async def main():
+
+ while True:
+
+ try:
+
+ # it works only if this script is run by K8s as a POD
+ config.load_incluster_config()
+
+ v1 = client.CoreV1Api()
+ print("Listing pods with their IPs:")
+ ret = await v1.list_pod_for_all_namespaces()
+
+ for i in ret.items:
+ print(i.status.pod_ip, i.metadata.namespace, i.metadata.name)
+
+ except Exception:
+ traceback.print_exc(file=sys.stdout)
+
+ finally:
+ print("sleep 10s")
+ await asyncio.sleep(10)
+
+
+if __name__ == "__main__":
+ loop = asyncio.get_event_loop()
+ loop.run_until_complete(main())
+ loop.close()
diff --git a/examples_asyncio/list_pods.py b/examples_asyncio/list_pods.py
new file mode 100644
index 0000000000..ccb0c607a6
--- /dev/null
+++ b/examples_asyncio/list_pods.py
@@ -0,0 +1,27 @@
+import asyncio
+
+from kubernetes_asyncio import client, config
+from kubernetes_asyncio.client.api_client import ApiClient
+
+
+async def main():
+ # Configs can be set in Configuration class directly or using helper
+ # utility. If no argument provided, the config will be loaded from
+ # default location.
+ await config.load_kube_config()
+
+ # use the context manager to close http sessions automatically
+ async with ApiClient() as api:
+
+ v1 = client.CoreV1Api(api)
+ print("Listing pods with their IPs:")
+ ret = await v1.list_pod_for_all_namespaces()
+
+ for i in ret.items:
+ print(i.status.pod_ip, i.metadata.namespace, i.metadata.name)
+
+
+if __name__ == "__main__":
+ loop = asyncio.get_event_loop()
+ loop.run_until_complete(main())
+ loop.close()
diff --git a/examples_asyncio/patch.py b/examples_asyncio/patch.py
new file mode 100644
index 0000000000..ba28e231ab
--- /dev/null
+++ b/examples_asyncio/patch.py
@@ -0,0 +1,109 @@
+import asyncio
+
+from kubernetes_asyncio import client, config
+from kubernetes_asyncio.client.api_client import ApiClient
+
+SERVICE_NAME = "example-service"
+SERVICE_NS = "default"
+SERVICE_SPEC = {
+ "apiVersion": "v1",
+ "kind": "Service",
+ "metadata": {
+ "labels": {"name": SERVICE_NAME},
+ "name": SERVICE_NAME,
+ "resourceversion": "v1",
+ },
+ "spec": {
+ "ports": [{"name": "port-80", "port": 80, "protocol": "TCP", "targetPort": 80}],
+ "selector": {"name": SERVICE_NAME},
+ },
+}
+
+
+async def main():
+
+ await config.load_kube_config()
+
+ async with ApiClient() as api:
+
+ v1 = client.CoreV1Api(api)
+
+ print(f"Recreate {SERVICE_NAME}...")
+ try:
+ await v1.read_namespaced_service(SERVICE_NAME, SERVICE_NS)
+ await v1.delete_namespaced_service(SERVICE_NAME, SERVICE_NS)
+ except client.exceptions.ApiException as ex:
+ if ex.status == 404:
+ pass
+
+ await v1.create_namespaced_service(SERVICE_NS, SERVICE_SPEC)
+
+ print("Patch using JSON patch - replace port-80 with port-1000")
+ patch = [
+ {
+ "op": "replace",
+ "path": "/spec/ports/0",
+ "value": {
+ "name": "port-1000",
+ "protocol": "TCP",
+ "port": 1000,
+ "targetPort": 1000,
+ },
+ }
+ ]
+ await v1.patch_namespaced_service(
+ SERVICE_NAME,
+ SERVICE_NS,
+ patch,
+ # _content_type='application/json-patch+json' # (optional, default if patch is a list)
+ )
+
+ print(
+ "Patch using strategic merge patch - add port-2000, service will have two ports: port-1000 and port-2000"
+ )
+ patch = {
+ "spec": {
+ "ports": [
+ {
+ "name": "port-2000",
+ "protocol": "TCP",
+ "port": 2000,
+ "targetPort": 2000,
+ }
+ ]
+ }
+ }
+ await v1.patch_namespaced_service(
+ SERVICE_NAME,
+ SERVICE_NS,
+ patch,
+ # _content_type='application/strategic-merge-patch+json' # (optional, default if patch is a dict)
+ )
+
+ print(
+ "Patch using merge patch - recreate list of ports, service will have only one port: port-3000"
+ )
+ patch = {
+ "spec": {
+ "ports": [
+ {
+ "name": "port-3000",
+ "protocol": "TCP",
+ "port": 3000,
+ "targetPort": 3000,
+ }
+ ]
+ }
+ }
+ await v1.patch_namespaced_service(
+ SERVICE_NAME,
+ SERVICE_NS,
+ patch,
+ _content_type="application/merge-patch+json", # required to force merge patch
+ )
+
+
+if __name__ == "__main__":
+ loop = asyncio.get_event_loop()
+ loop.run_until_complete(main())
+ loop.close()
diff --git a/kubernetes_asyncio/.gitignore b/kubernetes_asyncio/.gitignore
new file mode 100644
index 0000000000..43995bd42f
--- /dev/null
+++ b/kubernetes_asyncio/.gitignore
@@ -0,0 +1,66 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.venv/
+.python-version
+.pytest_cache
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
diff --git a/kubernetes_asyncio/.gitlab-ci.yml b/kubernetes_asyncio/.gitlab-ci.yml
new file mode 100644
index 0000000000..3c5125d395
--- /dev/null
+++ b/kubernetes_asyncio/.gitlab-ci.yml
@@ -0,0 +1,33 @@
+# ref: https://docs.gitlab.com/ee/ci/README.html
+
+stages:
+ - test
+
+.nosetest:
+ stage: test
+ script:
+ - pip install -r requirements.txt
+ - pip install -r test-requirements.txt
+ - pytest --cov=client
+
+nosetest-2.7:
+ extends: .nosetest
+ image: python:2.7-alpine
+nosetest-3.3:
+ extends: .nosetest
+ image: python:3.3-alpine
+nosetest-3.4:
+ extends: .nosetest
+ image: python:3.4-alpine
+nosetest-3.5:
+ extends: .nosetest
+ image: python:3.5-alpine
+nosetest-3.6:
+ extends: .nosetest
+ image: python:3.6-alpine
+nosetest-3.7:
+ extends: .nosetest
+ image: python:3.7-alpine
+nosetest-3.8:
+ extends: .nosetest
+ image: python:3.8-alpine
diff --git a/kubernetes_asyncio/.openapi-generator-ignore b/kubernetes_asyncio/.openapi-generator-ignore
new file mode 100644
index 0000000000..7484ee590a
--- /dev/null
+++ b/kubernetes_asyncio/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/kubernetes_asyncio/.openapi-generator/COMMIT b/kubernetes_asyncio/.openapi-generator/COMMIT
new file mode 100644
index 0000000000..e55d78f521
--- /dev/null
+++ b/kubernetes_asyncio/.openapi-generator/COMMIT
@@ -0,0 +1,2 @@
+Requested Commit/Tag : v6.6.0
+Actual Commit : 7f8b853f502d9039c9a0aac2614ce92871e895ed
diff --git a/kubernetes_asyncio/.openapi-generator/FILES b/kubernetes_asyncio/.openapi-generator/FILES
new file mode 100644
index 0000000000..774595a2d3
--- /dev/null
+++ b/kubernetes_asyncio/.openapi-generator/FILES
@@ -0,0 +1,2407 @@
+.gitignore
+.gitlab-ci.yml
+.openapi-generator-ignore
+.travis.yml
+README.md
+client/__init__.py
+client/api/__init__.py
+client/api/admissionregistration_api.py
+client/api/admissionregistration_v1_api.py
+client/api/admissionregistration_v1alpha1_api.py
+client/api/admissionregistration_v1beta1_api.py
+client/api/apiextensions_api.py
+client/api/apiextensions_v1_api.py
+client/api/apiregistration_api.py
+client/api/apiregistration_v1_api.py
+client/api/apis_api.py
+client/api/apps_api.py
+client/api/apps_v1_api.py
+client/api/authentication_api.py
+client/api/authentication_v1_api.py
+client/api/authorization_api.py
+client/api/authorization_v1_api.py
+client/api/autoscaling_api.py
+client/api/autoscaling_v1_api.py
+client/api/autoscaling_v2_api.py
+client/api/batch_api.py
+client/api/batch_v1_api.py
+client/api/certificates_api.py
+client/api/certificates_v1_api.py
+client/api/certificates_v1alpha1_api.py
+client/api/certificates_v1beta1_api.py
+client/api/coordination_api.py
+client/api/coordination_v1_api.py
+client/api/coordination_v1alpha2_api.py
+client/api/coordination_v1beta1_api.py
+client/api/core_api.py
+client/api/core_v1_api.py
+client/api/custom_objects_api.py
+client/api/discovery_api.py
+client/api/discovery_v1_api.py
+client/api/events_api.py
+client/api/events_v1_api.py
+client/api/flowcontrol_apiserver_api.py
+client/api/flowcontrol_apiserver_v1_api.py
+client/api/internal_apiserver_api.py
+client/api/internal_apiserver_v1alpha1_api.py
+client/api/logs_api.py
+client/api/networking_api.py
+client/api/networking_v1_api.py
+client/api/networking_v1beta1_api.py
+client/api/node_api.py
+client/api/node_v1_api.py
+client/api/openid_api.py
+client/api/policy_api.py
+client/api/policy_v1_api.py
+client/api/rbac_authorization_api.py
+client/api/rbac_authorization_v1_api.py
+client/api/resource_api.py
+client/api/resource_v1_api.py
+client/api/resource_v1alpha3_api.py
+client/api/resource_v1beta1_api.py
+client/api/resource_v1beta2_api.py
+client/api/scheduling_api.py
+client/api/scheduling_v1_api.py
+client/api/scheduling_v1alpha1_api.py
+client/api/storage_api.py
+client/api/storage_v1_api.py
+client/api/storage_v1beta1_api.py
+client/api/storagemigration_api.py
+client/api/storagemigration_v1beta1_api.py
+client/api/version_api.py
+client/api/well_known_api.py
+client/api_client.py
+client/configuration.py
+client/exceptions.py
+client/models/__init__.py
+client/models/admissionregistration_v1_service_reference.py
+client/models/admissionregistration_v1_webhook_client_config.py
+client/models/apiextensions_v1_service_reference.py
+client/models/apiextensions_v1_webhook_client_config.py
+client/models/apiregistration_v1_service_reference.py
+client/models/authentication_v1_token_request.py
+client/models/core_v1_endpoint_port.py
+client/models/core_v1_event.py
+client/models/core_v1_event_list.py
+client/models/core_v1_event_series.py
+client/models/core_v1_resource_claim.py
+client/models/discovery_v1_endpoint_port.py
+client/models/events_v1_event.py
+client/models/events_v1_event_list.py
+client/models/events_v1_event_series.py
+client/models/flowcontrol_v1_subject.py
+client/models/rbac_v1_subject.py
+client/models/resource_v1_resource_claim.py
+client/models/storage_v1_token_request.py
+client/models/v1_affinity.py
+client/models/v1_aggregation_rule.py
+client/models/v1_allocated_device_status.py
+client/models/v1_allocation_result.py
+client/models/v1_api_group.py
+client/models/v1_api_group_list.py
+client/models/v1_api_resource.py
+client/models/v1_api_resource_list.py
+client/models/v1_api_service.py
+client/models/v1_api_service_condition.py
+client/models/v1_api_service_list.py
+client/models/v1_api_service_spec.py
+client/models/v1_api_service_status.py
+client/models/v1_api_versions.py
+client/models/v1_app_armor_profile.py
+client/models/v1_attached_volume.py
+client/models/v1_audit_annotation.py
+client/models/v1_aws_elastic_block_store_volume_source.py
+client/models/v1_azure_disk_volume_source.py
+client/models/v1_azure_file_persistent_volume_source.py
+client/models/v1_azure_file_volume_source.py
+client/models/v1_binding.py
+client/models/v1_bound_object_reference.py
+client/models/v1_capabilities.py
+client/models/v1_capacity_request_policy.py
+client/models/v1_capacity_request_policy_range.py
+client/models/v1_capacity_requirements.py
+client/models/v1_cel_device_selector.py
+client/models/v1_ceph_fs_persistent_volume_source.py
+client/models/v1_ceph_fs_volume_source.py
+client/models/v1_certificate_signing_request.py
+client/models/v1_certificate_signing_request_condition.py
+client/models/v1_certificate_signing_request_list.py
+client/models/v1_certificate_signing_request_spec.py
+client/models/v1_certificate_signing_request_status.py
+client/models/v1_cinder_persistent_volume_source.py
+client/models/v1_cinder_volume_source.py
+client/models/v1_client_ip_config.py
+client/models/v1_cluster_role.py
+client/models/v1_cluster_role_binding.py
+client/models/v1_cluster_role_binding_list.py
+client/models/v1_cluster_role_list.py
+client/models/v1_cluster_trust_bundle_projection.py
+client/models/v1_component_condition.py
+client/models/v1_component_status.py
+client/models/v1_component_status_list.py
+client/models/v1_condition.py
+client/models/v1_config_map.py
+client/models/v1_config_map_env_source.py
+client/models/v1_config_map_key_selector.py
+client/models/v1_config_map_list.py
+client/models/v1_config_map_node_config_source.py
+client/models/v1_config_map_projection.py
+client/models/v1_config_map_volume_source.py
+client/models/v1_container.py
+client/models/v1_container_extended_resource_request.py
+client/models/v1_container_image.py
+client/models/v1_container_port.py
+client/models/v1_container_resize_policy.py
+client/models/v1_container_restart_rule.py
+client/models/v1_container_restart_rule_on_exit_codes.py
+client/models/v1_container_state.py
+client/models/v1_container_state_running.py
+client/models/v1_container_state_terminated.py
+client/models/v1_container_state_waiting.py
+client/models/v1_container_status.py
+client/models/v1_container_user.py
+client/models/v1_controller_revision.py
+client/models/v1_controller_revision_list.py
+client/models/v1_counter.py
+client/models/v1_counter_set.py
+client/models/v1_cron_job.py
+client/models/v1_cron_job_list.py
+client/models/v1_cron_job_spec.py
+client/models/v1_cron_job_status.py
+client/models/v1_cross_version_object_reference.py
+client/models/v1_csi_driver.py
+client/models/v1_csi_driver_list.py
+client/models/v1_csi_driver_spec.py
+client/models/v1_csi_node.py
+client/models/v1_csi_node_driver.py
+client/models/v1_csi_node_list.py
+client/models/v1_csi_node_spec.py
+client/models/v1_csi_persistent_volume_source.py
+client/models/v1_csi_storage_capacity.py
+client/models/v1_csi_storage_capacity_list.py
+client/models/v1_csi_volume_source.py
+client/models/v1_custom_resource_column_definition.py
+client/models/v1_custom_resource_conversion.py
+client/models/v1_custom_resource_definition.py
+client/models/v1_custom_resource_definition_condition.py
+client/models/v1_custom_resource_definition_list.py
+client/models/v1_custom_resource_definition_names.py
+client/models/v1_custom_resource_definition_spec.py
+client/models/v1_custom_resource_definition_status.py
+client/models/v1_custom_resource_definition_version.py
+client/models/v1_custom_resource_subresource_scale.py
+client/models/v1_custom_resource_subresources.py
+client/models/v1_custom_resource_validation.py
+client/models/v1_daemon_endpoint.py
+client/models/v1_daemon_set.py
+client/models/v1_daemon_set_condition.py
+client/models/v1_daemon_set_list.py
+client/models/v1_daemon_set_spec.py
+client/models/v1_daemon_set_status.py
+client/models/v1_daemon_set_update_strategy.py
+client/models/v1_delete_options.py
+client/models/v1_deployment.py
+client/models/v1_deployment_condition.py
+client/models/v1_deployment_list.py
+client/models/v1_deployment_spec.py
+client/models/v1_deployment_status.py
+client/models/v1_deployment_strategy.py
+client/models/v1_device.py
+client/models/v1_device_allocation_configuration.py
+client/models/v1_device_allocation_result.py
+client/models/v1_device_attribute.py
+client/models/v1_device_capacity.py
+client/models/v1_device_claim.py
+client/models/v1_device_claim_configuration.py
+client/models/v1_device_class.py
+client/models/v1_device_class_configuration.py
+client/models/v1_device_class_list.py
+client/models/v1_device_class_spec.py
+client/models/v1_device_constraint.py
+client/models/v1_device_counter_consumption.py
+client/models/v1_device_request.py
+client/models/v1_device_request_allocation_result.py
+client/models/v1_device_selector.py
+client/models/v1_device_sub_request.py
+client/models/v1_device_taint.py
+client/models/v1_device_toleration.py
+client/models/v1_downward_api_projection.py
+client/models/v1_downward_api_volume_file.py
+client/models/v1_downward_api_volume_source.py
+client/models/v1_empty_dir_volume_source.py
+client/models/v1_endpoint.py
+client/models/v1_endpoint_address.py
+client/models/v1_endpoint_conditions.py
+client/models/v1_endpoint_hints.py
+client/models/v1_endpoint_slice.py
+client/models/v1_endpoint_slice_list.py
+client/models/v1_endpoint_subset.py
+client/models/v1_endpoints.py
+client/models/v1_endpoints_list.py
+client/models/v1_env_from_source.py
+client/models/v1_env_var.py
+client/models/v1_env_var_source.py
+client/models/v1_ephemeral_container.py
+client/models/v1_ephemeral_volume_source.py
+client/models/v1_event_source.py
+client/models/v1_eviction.py
+client/models/v1_exact_device_request.py
+client/models/v1_exec_action.py
+client/models/v1_exempt_priority_level_configuration.py
+client/models/v1_expression_warning.py
+client/models/v1_external_documentation.py
+client/models/v1_fc_volume_source.py
+client/models/v1_field_selector_attributes.py
+client/models/v1_field_selector_requirement.py
+client/models/v1_file_key_selector.py
+client/models/v1_flex_persistent_volume_source.py
+client/models/v1_flex_volume_source.py
+client/models/v1_flocker_volume_source.py
+client/models/v1_flow_distinguisher_method.py
+client/models/v1_flow_schema.py
+client/models/v1_flow_schema_condition.py
+client/models/v1_flow_schema_list.py
+client/models/v1_flow_schema_spec.py
+client/models/v1_flow_schema_status.py
+client/models/v1_for_node.py
+client/models/v1_for_zone.py
+client/models/v1_gce_persistent_disk_volume_source.py
+client/models/v1_git_repo_volume_source.py
+client/models/v1_glusterfs_persistent_volume_source.py
+client/models/v1_glusterfs_volume_source.py
+client/models/v1_group_resource.py
+client/models/v1_group_subject.py
+client/models/v1_group_version_for_discovery.py
+client/models/v1_grpc_action.py
+client/models/v1_horizontal_pod_autoscaler.py
+client/models/v1_horizontal_pod_autoscaler_list.py
+client/models/v1_horizontal_pod_autoscaler_spec.py
+client/models/v1_horizontal_pod_autoscaler_status.py
+client/models/v1_host_alias.py
+client/models/v1_host_ip.py
+client/models/v1_host_path_volume_source.py
+client/models/v1_http_get_action.py
+client/models/v1_http_header.py
+client/models/v1_http_ingress_path.py
+client/models/v1_http_ingress_rule_value.py
+client/models/v1_image_volume_source.py
+client/models/v1_ingress.py
+client/models/v1_ingress_backend.py
+client/models/v1_ingress_class.py
+client/models/v1_ingress_class_list.py
+client/models/v1_ingress_class_parameters_reference.py
+client/models/v1_ingress_class_spec.py
+client/models/v1_ingress_list.py
+client/models/v1_ingress_load_balancer_ingress.py
+client/models/v1_ingress_load_balancer_status.py
+client/models/v1_ingress_port_status.py
+client/models/v1_ingress_rule.py
+client/models/v1_ingress_service_backend.py
+client/models/v1_ingress_spec.py
+client/models/v1_ingress_status.py
+client/models/v1_ingress_tls.py
+client/models/v1_ip_address.py
+client/models/v1_ip_address_list.py
+client/models/v1_ip_address_spec.py
+client/models/v1_ip_block.py
+client/models/v1_iscsi_persistent_volume_source.py
+client/models/v1_iscsi_volume_source.py
+client/models/v1_job.py
+client/models/v1_job_condition.py
+client/models/v1_job_list.py
+client/models/v1_job_spec.py
+client/models/v1_job_status.py
+client/models/v1_job_template_spec.py
+client/models/v1_json_schema_props.py
+client/models/v1_key_to_path.py
+client/models/v1_label_selector.py
+client/models/v1_label_selector_attributes.py
+client/models/v1_label_selector_requirement.py
+client/models/v1_lease.py
+client/models/v1_lease_list.py
+client/models/v1_lease_spec.py
+client/models/v1_lifecycle.py
+client/models/v1_lifecycle_handler.py
+client/models/v1_limit_range.py
+client/models/v1_limit_range_item.py
+client/models/v1_limit_range_list.py
+client/models/v1_limit_range_spec.py
+client/models/v1_limit_response.py
+client/models/v1_limited_priority_level_configuration.py
+client/models/v1_linux_container_user.py
+client/models/v1_list_meta.py
+client/models/v1_load_balancer_ingress.py
+client/models/v1_load_balancer_status.py
+client/models/v1_local_object_reference.py
+client/models/v1_local_subject_access_review.py
+client/models/v1_local_volume_source.py
+client/models/v1_managed_fields_entry.py
+client/models/v1_match_condition.py
+client/models/v1_match_resources.py
+client/models/v1_modify_volume_status.py
+client/models/v1_mutating_webhook.py
+client/models/v1_mutating_webhook_configuration.py
+client/models/v1_mutating_webhook_configuration_list.py
+client/models/v1_named_rule_with_operations.py
+client/models/v1_namespace.py
+client/models/v1_namespace_condition.py
+client/models/v1_namespace_list.py
+client/models/v1_namespace_spec.py
+client/models/v1_namespace_status.py
+client/models/v1_network_device_data.py
+client/models/v1_network_policy.py
+client/models/v1_network_policy_egress_rule.py
+client/models/v1_network_policy_ingress_rule.py
+client/models/v1_network_policy_list.py
+client/models/v1_network_policy_peer.py
+client/models/v1_network_policy_port.py
+client/models/v1_network_policy_spec.py
+client/models/v1_nfs_volume_source.py
+client/models/v1_node.py
+client/models/v1_node_address.py
+client/models/v1_node_affinity.py
+client/models/v1_node_condition.py
+client/models/v1_node_config_source.py
+client/models/v1_node_config_status.py
+client/models/v1_node_daemon_endpoints.py
+client/models/v1_node_features.py
+client/models/v1_node_list.py
+client/models/v1_node_runtime_handler.py
+client/models/v1_node_runtime_handler_features.py
+client/models/v1_node_selector.py
+client/models/v1_node_selector_requirement.py
+client/models/v1_node_selector_term.py
+client/models/v1_node_spec.py
+client/models/v1_node_status.py
+client/models/v1_node_swap_status.py
+client/models/v1_node_system_info.py
+client/models/v1_non_resource_attributes.py
+client/models/v1_non_resource_policy_rule.py
+client/models/v1_non_resource_rule.py
+client/models/v1_object_field_selector.py
+client/models/v1_object_meta.py
+client/models/v1_object_reference.py
+client/models/v1_opaque_device_configuration.py
+client/models/v1_overhead.py
+client/models/v1_owner_reference.py
+client/models/v1_param_kind.py
+client/models/v1_param_ref.py
+client/models/v1_parent_reference.py
+client/models/v1_persistent_volume.py
+client/models/v1_persistent_volume_claim.py
+client/models/v1_persistent_volume_claim_condition.py
+client/models/v1_persistent_volume_claim_list.py
+client/models/v1_persistent_volume_claim_spec.py
+client/models/v1_persistent_volume_claim_status.py
+client/models/v1_persistent_volume_claim_template.py
+client/models/v1_persistent_volume_claim_volume_source.py
+client/models/v1_persistent_volume_list.py
+client/models/v1_persistent_volume_spec.py
+client/models/v1_persistent_volume_status.py
+client/models/v1_photon_persistent_disk_volume_source.py
+client/models/v1_pod.py
+client/models/v1_pod_affinity.py
+client/models/v1_pod_affinity_term.py
+client/models/v1_pod_anti_affinity.py
+client/models/v1_pod_certificate_projection.py
+client/models/v1_pod_condition.py
+client/models/v1_pod_disruption_budget.py
+client/models/v1_pod_disruption_budget_list.py
+client/models/v1_pod_disruption_budget_spec.py
+client/models/v1_pod_disruption_budget_status.py
+client/models/v1_pod_dns_config.py
+client/models/v1_pod_dns_config_option.py
+client/models/v1_pod_extended_resource_claim_status.py
+client/models/v1_pod_failure_policy.py
+client/models/v1_pod_failure_policy_on_exit_codes_requirement.py
+client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py
+client/models/v1_pod_failure_policy_rule.py
+client/models/v1_pod_ip.py
+client/models/v1_pod_list.py
+client/models/v1_pod_os.py
+client/models/v1_pod_readiness_gate.py
+client/models/v1_pod_resource_claim.py
+client/models/v1_pod_resource_claim_status.py
+client/models/v1_pod_scheduling_gate.py
+client/models/v1_pod_security_context.py
+client/models/v1_pod_spec.py
+client/models/v1_pod_status.py
+client/models/v1_pod_template.py
+client/models/v1_pod_template_list.py
+client/models/v1_pod_template_spec.py
+client/models/v1_policy_rule.py
+client/models/v1_policy_rules_with_subjects.py
+client/models/v1_port_status.py
+client/models/v1_portworx_volume_source.py
+client/models/v1_preconditions.py
+client/models/v1_preferred_scheduling_term.py
+client/models/v1_priority_class.py
+client/models/v1_priority_class_list.py
+client/models/v1_priority_level_configuration.py
+client/models/v1_priority_level_configuration_condition.py
+client/models/v1_priority_level_configuration_list.py
+client/models/v1_priority_level_configuration_reference.py
+client/models/v1_priority_level_configuration_spec.py
+client/models/v1_priority_level_configuration_status.py
+client/models/v1_probe.py
+client/models/v1_projected_volume_source.py
+client/models/v1_queuing_configuration.py
+client/models/v1_quobyte_volume_source.py
+client/models/v1_rbd_persistent_volume_source.py
+client/models/v1_rbd_volume_source.py
+client/models/v1_replica_set.py
+client/models/v1_replica_set_condition.py
+client/models/v1_replica_set_list.py
+client/models/v1_replica_set_spec.py
+client/models/v1_replica_set_status.py
+client/models/v1_replication_controller.py
+client/models/v1_replication_controller_condition.py
+client/models/v1_replication_controller_list.py
+client/models/v1_replication_controller_spec.py
+client/models/v1_replication_controller_status.py
+client/models/v1_resource_attributes.py
+client/models/v1_resource_claim_consumer_reference.py
+client/models/v1_resource_claim_list.py
+client/models/v1_resource_claim_spec.py
+client/models/v1_resource_claim_status.py
+client/models/v1_resource_claim_template.py
+client/models/v1_resource_claim_template_list.py
+client/models/v1_resource_claim_template_spec.py
+client/models/v1_resource_field_selector.py
+client/models/v1_resource_health.py
+client/models/v1_resource_policy_rule.py
+client/models/v1_resource_pool.py
+client/models/v1_resource_quota.py
+client/models/v1_resource_quota_list.py
+client/models/v1_resource_quota_spec.py
+client/models/v1_resource_quota_status.py
+client/models/v1_resource_requirements.py
+client/models/v1_resource_rule.py
+client/models/v1_resource_slice.py
+client/models/v1_resource_slice_list.py
+client/models/v1_resource_slice_spec.py
+client/models/v1_resource_status.py
+client/models/v1_role.py
+client/models/v1_role_binding.py
+client/models/v1_role_binding_list.py
+client/models/v1_role_list.py
+client/models/v1_role_ref.py
+client/models/v1_rolling_update_daemon_set.py
+client/models/v1_rolling_update_deployment.py
+client/models/v1_rolling_update_stateful_set_strategy.py
+client/models/v1_rule_with_operations.py
+client/models/v1_runtime_class.py
+client/models/v1_runtime_class_list.py
+client/models/v1_scale.py
+client/models/v1_scale_io_persistent_volume_source.py
+client/models/v1_scale_io_volume_source.py
+client/models/v1_scale_spec.py
+client/models/v1_scale_status.py
+client/models/v1_scheduling.py
+client/models/v1_scope_selector.py
+client/models/v1_scoped_resource_selector_requirement.py
+client/models/v1_se_linux_options.py
+client/models/v1_seccomp_profile.py
+client/models/v1_secret.py
+client/models/v1_secret_env_source.py
+client/models/v1_secret_key_selector.py
+client/models/v1_secret_list.py
+client/models/v1_secret_projection.py
+client/models/v1_secret_reference.py
+client/models/v1_secret_volume_source.py
+client/models/v1_security_context.py
+client/models/v1_selectable_field.py
+client/models/v1_self_subject_access_review.py
+client/models/v1_self_subject_access_review_spec.py
+client/models/v1_self_subject_review.py
+client/models/v1_self_subject_review_status.py
+client/models/v1_self_subject_rules_review.py
+client/models/v1_self_subject_rules_review_spec.py
+client/models/v1_server_address_by_client_cidr.py
+client/models/v1_service.py
+client/models/v1_service_account.py
+client/models/v1_service_account_list.py
+client/models/v1_service_account_subject.py
+client/models/v1_service_account_token_projection.py
+client/models/v1_service_backend_port.py
+client/models/v1_service_cidr.py
+client/models/v1_service_cidr_list.py
+client/models/v1_service_cidr_spec.py
+client/models/v1_service_cidr_status.py
+client/models/v1_service_list.py
+client/models/v1_service_port.py
+client/models/v1_service_spec.py
+client/models/v1_service_status.py
+client/models/v1_session_affinity_config.py
+client/models/v1_sleep_action.py
+client/models/v1_stateful_set.py
+client/models/v1_stateful_set_condition.py
+client/models/v1_stateful_set_list.py
+client/models/v1_stateful_set_ordinals.py
+client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py
+client/models/v1_stateful_set_spec.py
+client/models/v1_stateful_set_status.py
+client/models/v1_stateful_set_update_strategy.py
+client/models/v1_status.py
+client/models/v1_status_cause.py
+client/models/v1_status_details.py
+client/models/v1_storage_class.py
+client/models/v1_storage_class_list.py
+client/models/v1_storage_os_persistent_volume_source.py
+client/models/v1_storage_os_volume_source.py
+client/models/v1_subject_access_review.py
+client/models/v1_subject_access_review_spec.py
+client/models/v1_subject_access_review_status.py
+client/models/v1_subject_rules_review_status.py
+client/models/v1_success_policy.py
+client/models/v1_success_policy_rule.py
+client/models/v1_sysctl.py
+client/models/v1_taint.py
+client/models/v1_tcp_socket_action.py
+client/models/v1_token_request_spec.py
+client/models/v1_token_request_status.py
+client/models/v1_token_review.py
+client/models/v1_token_review_spec.py
+client/models/v1_token_review_status.py
+client/models/v1_toleration.py
+client/models/v1_topology_selector_label_requirement.py
+client/models/v1_topology_selector_term.py
+client/models/v1_topology_spread_constraint.py
+client/models/v1_type_checking.py
+client/models/v1_typed_local_object_reference.py
+client/models/v1_typed_object_reference.py
+client/models/v1_uncounted_terminated_pods.py
+client/models/v1_user_info.py
+client/models/v1_user_subject.py
+client/models/v1_validating_admission_policy.py
+client/models/v1_validating_admission_policy_binding.py
+client/models/v1_validating_admission_policy_binding_list.py
+client/models/v1_validating_admission_policy_binding_spec.py
+client/models/v1_validating_admission_policy_list.py
+client/models/v1_validating_admission_policy_spec.py
+client/models/v1_validating_admission_policy_status.py
+client/models/v1_validating_webhook.py
+client/models/v1_validating_webhook_configuration.py
+client/models/v1_validating_webhook_configuration_list.py
+client/models/v1_validation.py
+client/models/v1_validation_rule.py
+client/models/v1_variable.py
+client/models/v1_volume.py
+client/models/v1_volume_attachment.py
+client/models/v1_volume_attachment_list.py
+client/models/v1_volume_attachment_source.py
+client/models/v1_volume_attachment_spec.py
+client/models/v1_volume_attachment_status.py
+client/models/v1_volume_attributes_class.py
+client/models/v1_volume_attributes_class_list.py
+client/models/v1_volume_device.py
+client/models/v1_volume_error.py
+client/models/v1_volume_mount.py
+client/models/v1_volume_mount_status.py
+client/models/v1_volume_node_affinity.py
+client/models/v1_volume_node_resources.py
+client/models/v1_volume_projection.py
+client/models/v1_volume_resource_requirements.py
+client/models/v1_vsphere_virtual_disk_volume_source.py
+client/models/v1_watch_event.py
+client/models/v1_webhook_conversion.py
+client/models/v1_weighted_pod_affinity_term.py
+client/models/v1_windows_security_context_options.py
+client/models/v1_workload_reference.py
+client/models/v1alpha1_apply_configuration.py
+client/models/v1alpha1_cluster_trust_bundle.py
+client/models/v1alpha1_cluster_trust_bundle_list.py
+client/models/v1alpha1_cluster_trust_bundle_spec.py
+client/models/v1alpha1_gang_scheduling_policy.py
+client/models/v1alpha1_json_patch.py
+client/models/v1alpha1_match_condition.py
+client/models/v1alpha1_match_resources.py
+client/models/v1alpha1_mutating_admission_policy.py
+client/models/v1alpha1_mutating_admission_policy_binding.py
+client/models/v1alpha1_mutating_admission_policy_binding_list.py
+client/models/v1alpha1_mutating_admission_policy_binding_spec.py
+client/models/v1alpha1_mutating_admission_policy_list.py
+client/models/v1alpha1_mutating_admission_policy_spec.py
+client/models/v1alpha1_mutation.py
+client/models/v1alpha1_named_rule_with_operations.py
+client/models/v1alpha1_param_kind.py
+client/models/v1alpha1_param_ref.py
+client/models/v1alpha1_pod_group.py
+client/models/v1alpha1_pod_group_policy.py
+client/models/v1alpha1_server_storage_version.py
+client/models/v1alpha1_storage_version.py
+client/models/v1alpha1_storage_version_condition.py
+client/models/v1alpha1_storage_version_list.py
+client/models/v1alpha1_storage_version_status.py
+client/models/v1alpha1_typed_local_object_reference.py
+client/models/v1alpha1_variable.py
+client/models/v1alpha1_workload.py
+client/models/v1alpha1_workload_list.py
+client/models/v1alpha1_workload_spec.py
+client/models/v1alpha2_lease_candidate.py
+client/models/v1alpha2_lease_candidate_list.py
+client/models/v1alpha2_lease_candidate_spec.py
+client/models/v1alpha3_device_taint.py
+client/models/v1alpha3_device_taint_rule.py
+client/models/v1alpha3_device_taint_rule_list.py
+client/models/v1alpha3_device_taint_rule_spec.py
+client/models/v1alpha3_device_taint_rule_status.py
+client/models/v1alpha3_device_taint_selector.py
+client/models/v1beta1_allocated_device_status.py
+client/models/v1beta1_allocation_result.py
+client/models/v1beta1_apply_configuration.py
+client/models/v1beta1_basic_device.py
+client/models/v1beta1_capacity_request_policy.py
+client/models/v1beta1_capacity_request_policy_range.py
+client/models/v1beta1_capacity_requirements.py
+client/models/v1beta1_cel_device_selector.py
+client/models/v1beta1_cluster_trust_bundle.py
+client/models/v1beta1_cluster_trust_bundle_list.py
+client/models/v1beta1_cluster_trust_bundle_spec.py
+client/models/v1beta1_counter.py
+client/models/v1beta1_counter_set.py
+client/models/v1beta1_device.py
+client/models/v1beta1_device_allocation_configuration.py
+client/models/v1beta1_device_allocation_result.py
+client/models/v1beta1_device_attribute.py
+client/models/v1beta1_device_capacity.py
+client/models/v1beta1_device_claim.py
+client/models/v1beta1_device_claim_configuration.py
+client/models/v1beta1_device_class.py
+client/models/v1beta1_device_class_configuration.py
+client/models/v1beta1_device_class_list.py
+client/models/v1beta1_device_class_spec.py
+client/models/v1beta1_device_constraint.py
+client/models/v1beta1_device_counter_consumption.py
+client/models/v1beta1_device_request.py
+client/models/v1beta1_device_request_allocation_result.py
+client/models/v1beta1_device_selector.py
+client/models/v1beta1_device_sub_request.py
+client/models/v1beta1_device_taint.py
+client/models/v1beta1_device_toleration.py
+client/models/v1beta1_ip_address.py
+client/models/v1beta1_ip_address_list.py
+client/models/v1beta1_ip_address_spec.py
+client/models/v1beta1_json_patch.py
+client/models/v1beta1_lease_candidate.py
+client/models/v1beta1_lease_candidate_list.py
+client/models/v1beta1_lease_candidate_spec.py
+client/models/v1beta1_match_condition.py
+client/models/v1beta1_match_resources.py
+client/models/v1beta1_mutating_admission_policy.py
+client/models/v1beta1_mutating_admission_policy_binding.py
+client/models/v1beta1_mutating_admission_policy_binding_list.py
+client/models/v1beta1_mutating_admission_policy_binding_spec.py
+client/models/v1beta1_mutating_admission_policy_list.py
+client/models/v1beta1_mutating_admission_policy_spec.py
+client/models/v1beta1_mutation.py
+client/models/v1beta1_named_rule_with_operations.py
+client/models/v1beta1_network_device_data.py
+client/models/v1beta1_opaque_device_configuration.py
+client/models/v1beta1_param_kind.py
+client/models/v1beta1_param_ref.py
+client/models/v1beta1_parent_reference.py
+client/models/v1beta1_pod_certificate_request.py
+client/models/v1beta1_pod_certificate_request_list.py
+client/models/v1beta1_pod_certificate_request_spec.py
+client/models/v1beta1_pod_certificate_request_status.py
+client/models/v1beta1_resource_claim.py
+client/models/v1beta1_resource_claim_consumer_reference.py
+client/models/v1beta1_resource_claim_list.py
+client/models/v1beta1_resource_claim_spec.py
+client/models/v1beta1_resource_claim_status.py
+client/models/v1beta1_resource_claim_template.py
+client/models/v1beta1_resource_claim_template_list.py
+client/models/v1beta1_resource_claim_template_spec.py
+client/models/v1beta1_resource_pool.py
+client/models/v1beta1_resource_slice.py
+client/models/v1beta1_resource_slice_list.py
+client/models/v1beta1_resource_slice_spec.py
+client/models/v1beta1_service_cidr.py
+client/models/v1beta1_service_cidr_list.py
+client/models/v1beta1_service_cidr_spec.py
+client/models/v1beta1_service_cidr_status.py
+client/models/v1beta1_storage_version_migration.py
+client/models/v1beta1_storage_version_migration_list.py
+client/models/v1beta1_storage_version_migration_spec.py
+client/models/v1beta1_storage_version_migration_status.py
+client/models/v1beta1_variable.py
+client/models/v1beta1_volume_attributes_class.py
+client/models/v1beta1_volume_attributes_class_list.py
+client/models/v1beta2_allocated_device_status.py
+client/models/v1beta2_allocation_result.py
+client/models/v1beta2_capacity_request_policy.py
+client/models/v1beta2_capacity_request_policy_range.py
+client/models/v1beta2_capacity_requirements.py
+client/models/v1beta2_cel_device_selector.py
+client/models/v1beta2_counter.py
+client/models/v1beta2_counter_set.py
+client/models/v1beta2_device.py
+client/models/v1beta2_device_allocation_configuration.py
+client/models/v1beta2_device_allocation_result.py
+client/models/v1beta2_device_attribute.py
+client/models/v1beta2_device_capacity.py
+client/models/v1beta2_device_claim.py
+client/models/v1beta2_device_claim_configuration.py
+client/models/v1beta2_device_class.py
+client/models/v1beta2_device_class_configuration.py
+client/models/v1beta2_device_class_list.py
+client/models/v1beta2_device_class_spec.py
+client/models/v1beta2_device_constraint.py
+client/models/v1beta2_device_counter_consumption.py
+client/models/v1beta2_device_request.py
+client/models/v1beta2_device_request_allocation_result.py
+client/models/v1beta2_device_selector.py
+client/models/v1beta2_device_sub_request.py
+client/models/v1beta2_device_taint.py
+client/models/v1beta2_device_toleration.py
+client/models/v1beta2_exact_device_request.py
+client/models/v1beta2_network_device_data.py
+client/models/v1beta2_opaque_device_configuration.py
+client/models/v1beta2_resource_claim.py
+client/models/v1beta2_resource_claim_consumer_reference.py
+client/models/v1beta2_resource_claim_list.py
+client/models/v1beta2_resource_claim_spec.py
+client/models/v1beta2_resource_claim_status.py
+client/models/v1beta2_resource_claim_template.py
+client/models/v1beta2_resource_claim_template_list.py
+client/models/v1beta2_resource_claim_template_spec.py
+client/models/v1beta2_resource_pool.py
+client/models/v1beta2_resource_slice.py
+client/models/v1beta2_resource_slice_list.py
+client/models/v1beta2_resource_slice_spec.py
+client/models/v2_api_group_discovery.py
+client/models/v2_api_group_discovery_list.py
+client/models/v2_api_resource_discovery.py
+client/models/v2_api_subresource_discovery.py
+client/models/v2_api_version_discovery.py
+client/models/v2_container_resource_metric_source.py
+client/models/v2_container_resource_metric_status.py
+client/models/v2_cross_version_object_reference.py
+client/models/v2_external_metric_source.py
+client/models/v2_external_metric_status.py
+client/models/v2_horizontal_pod_autoscaler.py
+client/models/v2_horizontal_pod_autoscaler_behavior.py
+client/models/v2_horizontal_pod_autoscaler_condition.py
+client/models/v2_horizontal_pod_autoscaler_list.py
+client/models/v2_horizontal_pod_autoscaler_spec.py
+client/models/v2_horizontal_pod_autoscaler_status.py
+client/models/v2_hpa_scaling_policy.py
+client/models/v2_hpa_scaling_rules.py
+client/models/v2_metric_identifier.py
+client/models/v2_metric_spec.py
+client/models/v2_metric_status.py
+client/models/v2_metric_target.py
+client/models/v2_metric_value_status.py
+client/models/v2_object_metric_source.py
+client/models/v2_object_metric_status.py
+client/models/v2_pods_metric_source.py
+client/models/v2_pods_metric_status.py
+client/models/v2_resource_metric_source.py
+client/models/v2_resource_metric_status.py
+client/models/v2beta1_api_group_discovery.py
+client/models/v2beta1_api_group_discovery_list.py
+client/models/v2beta1_api_resource_discovery.py
+client/models/v2beta1_api_subresource_discovery.py
+client/models/v2beta1_api_version_discovery.py
+client/models/version_info.py
+client/rest.py
+docs/AdmissionregistrationApi.md
+docs/AdmissionregistrationV1Api.md
+docs/AdmissionregistrationV1ServiceReference.md
+docs/AdmissionregistrationV1WebhookClientConfig.md
+docs/AdmissionregistrationV1alpha1Api.md
+docs/AdmissionregistrationV1beta1Api.md
+docs/ApiextensionsApi.md
+docs/ApiextensionsV1Api.md
+docs/ApiextensionsV1ServiceReference.md
+docs/ApiextensionsV1WebhookClientConfig.md
+docs/ApiregistrationApi.md
+docs/ApiregistrationV1Api.md
+docs/ApiregistrationV1ServiceReference.md
+docs/ApisApi.md
+docs/AppsApi.md
+docs/AppsV1Api.md
+docs/AuthenticationApi.md
+docs/AuthenticationV1Api.md
+docs/AuthenticationV1TokenRequest.md
+docs/AuthorizationApi.md
+docs/AuthorizationV1Api.md
+docs/AutoscalingApi.md
+docs/AutoscalingV1Api.md
+docs/AutoscalingV2Api.md
+docs/BatchApi.md
+docs/BatchV1Api.md
+docs/CertificatesApi.md
+docs/CertificatesV1Api.md
+docs/CertificatesV1alpha1Api.md
+docs/CertificatesV1beta1Api.md
+docs/CoordinationApi.md
+docs/CoordinationV1Api.md
+docs/CoordinationV1alpha2Api.md
+docs/CoordinationV1beta1Api.md
+docs/CoreApi.md
+docs/CoreV1Api.md
+docs/CoreV1EndpointPort.md
+docs/CoreV1Event.md
+docs/CoreV1EventList.md
+docs/CoreV1EventSeries.md
+docs/CoreV1ResourceClaim.md
+docs/CustomObjectsApi.md
+docs/DiscoveryApi.md
+docs/DiscoveryV1Api.md
+docs/DiscoveryV1EndpointPort.md
+docs/EventsApi.md
+docs/EventsV1Api.md
+docs/EventsV1Event.md
+docs/EventsV1EventList.md
+docs/EventsV1EventSeries.md
+docs/FlowcontrolApiserverApi.md
+docs/FlowcontrolApiserverV1Api.md
+docs/FlowcontrolV1Subject.md
+docs/InternalApiserverApi.md
+docs/InternalApiserverV1alpha1Api.md
+docs/LogsApi.md
+docs/NetworkingApi.md
+docs/NetworkingV1Api.md
+docs/NetworkingV1beta1Api.md
+docs/NodeApi.md
+docs/NodeV1Api.md
+docs/OpenidApi.md
+docs/PolicyApi.md
+docs/PolicyV1Api.md
+docs/RbacAuthorizationApi.md
+docs/RbacAuthorizationV1Api.md
+docs/RbacV1Subject.md
+docs/ResourceApi.md
+docs/ResourceV1Api.md
+docs/ResourceV1ResourceClaim.md
+docs/ResourceV1alpha3Api.md
+docs/ResourceV1beta1Api.md
+docs/ResourceV1beta2Api.md
+docs/SchedulingApi.md
+docs/SchedulingV1Api.md
+docs/SchedulingV1alpha1Api.md
+docs/StorageApi.md
+docs/StorageV1Api.md
+docs/StorageV1TokenRequest.md
+docs/StorageV1beta1Api.md
+docs/StoragemigrationApi.md
+docs/StoragemigrationV1beta1Api.md
+docs/V1APIGroup.md
+docs/V1APIGroupList.md
+docs/V1APIResource.md
+docs/V1APIResourceList.md
+docs/V1APIService.md
+docs/V1APIServiceCondition.md
+docs/V1APIServiceList.md
+docs/V1APIServiceSpec.md
+docs/V1APIServiceStatus.md
+docs/V1APIVersions.md
+docs/V1AWSElasticBlockStoreVolumeSource.md
+docs/V1Affinity.md
+docs/V1AggregationRule.md
+docs/V1AllocatedDeviceStatus.md
+docs/V1AllocationResult.md
+docs/V1AppArmorProfile.md
+docs/V1AttachedVolume.md
+docs/V1AuditAnnotation.md
+docs/V1AzureDiskVolumeSource.md
+docs/V1AzureFilePersistentVolumeSource.md
+docs/V1AzureFileVolumeSource.md
+docs/V1Binding.md
+docs/V1BoundObjectReference.md
+docs/V1CELDeviceSelector.md
+docs/V1CSIDriver.md
+docs/V1CSIDriverList.md
+docs/V1CSIDriverSpec.md
+docs/V1CSINode.md
+docs/V1CSINodeDriver.md
+docs/V1CSINodeList.md
+docs/V1CSINodeSpec.md
+docs/V1CSIPersistentVolumeSource.md
+docs/V1CSIStorageCapacity.md
+docs/V1CSIStorageCapacityList.md
+docs/V1CSIVolumeSource.md
+docs/V1Capabilities.md
+docs/V1CapacityRequestPolicy.md
+docs/V1CapacityRequestPolicyRange.md
+docs/V1CapacityRequirements.md
+docs/V1CephFSPersistentVolumeSource.md
+docs/V1CephFSVolumeSource.md
+docs/V1CertificateSigningRequest.md
+docs/V1CertificateSigningRequestCondition.md
+docs/V1CertificateSigningRequestList.md
+docs/V1CertificateSigningRequestSpec.md
+docs/V1CertificateSigningRequestStatus.md
+docs/V1CinderPersistentVolumeSource.md
+docs/V1CinderVolumeSource.md
+docs/V1ClientIPConfig.md
+docs/V1ClusterRole.md
+docs/V1ClusterRoleBinding.md
+docs/V1ClusterRoleBindingList.md
+docs/V1ClusterRoleList.md
+docs/V1ClusterTrustBundleProjection.md
+docs/V1ComponentCondition.md
+docs/V1ComponentStatus.md
+docs/V1ComponentStatusList.md
+docs/V1Condition.md
+docs/V1ConfigMap.md
+docs/V1ConfigMapEnvSource.md
+docs/V1ConfigMapKeySelector.md
+docs/V1ConfigMapList.md
+docs/V1ConfigMapNodeConfigSource.md
+docs/V1ConfigMapProjection.md
+docs/V1ConfigMapVolumeSource.md
+docs/V1Container.md
+docs/V1ContainerExtendedResourceRequest.md
+docs/V1ContainerImage.md
+docs/V1ContainerPort.md
+docs/V1ContainerResizePolicy.md
+docs/V1ContainerRestartRule.md
+docs/V1ContainerRestartRuleOnExitCodes.md
+docs/V1ContainerState.md
+docs/V1ContainerStateRunning.md
+docs/V1ContainerStateTerminated.md
+docs/V1ContainerStateWaiting.md
+docs/V1ContainerStatus.md
+docs/V1ContainerUser.md
+docs/V1ControllerRevision.md
+docs/V1ControllerRevisionList.md
+docs/V1Counter.md
+docs/V1CounterSet.md
+docs/V1CronJob.md
+docs/V1CronJobList.md
+docs/V1CronJobSpec.md
+docs/V1CronJobStatus.md
+docs/V1CrossVersionObjectReference.md
+docs/V1CustomResourceColumnDefinition.md
+docs/V1CustomResourceConversion.md
+docs/V1CustomResourceDefinition.md
+docs/V1CustomResourceDefinitionCondition.md
+docs/V1CustomResourceDefinitionList.md
+docs/V1CustomResourceDefinitionNames.md
+docs/V1CustomResourceDefinitionSpec.md
+docs/V1CustomResourceDefinitionStatus.md
+docs/V1CustomResourceDefinitionVersion.md
+docs/V1CustomResourceSubresourceScale.md
+docs/V1CustomResourceSubresources.md
+docs/V1CustomResourceValidation.md
+docs/V1DaemonEndpoint.md
+docs/V1DaemonSet.md
+docs/V1DaemonSetCondition.md
+docs/V1DaemonSetList.md
+docs/V1DaemonSetSpec.md
+docs/V1DaemonSetStatus.md
+docs/V1DaemonSetUpdateStrategy.md
+docs/V1DeleteOptions.md
+docs/V1Deployment.md
+docs/V1DeploymentCondition.md
+docs/V1DeploymentList.md
+docs/V1DeploymentSpec.md
+docs/V1DeploymentStatus.md
+docs/V1DeploymentStrategy.md
+docs/V1Device.md
+docs/V1DeviceAllocationConfiguration.md
+docs/V1DeviceAllocationResult.md
+docs/V1DeviceAttribute.md
+docs/V1DeviceCapacity.md
+docs/V1DeviceClaim.md
+docs/V1DeviceClaimConfiguration.md
+docs/V1DeviceClass.md
+docs/V1DeviceClassConfiguration.md
+docs/V1DeviceClassList.md
+docs/V1DeviceClassSpec.md
+docs/V1DeviceConstraint.md
+docs/V1DeviceCounterConsumption.md
+docs/V1DeviceRequest.md
+docs/V1DeviceRequestAllocationResult.md
+docs/V1DeviceSelector.md
+docs/V1DeviceSubRequest.md
+docs/V1DeviceTaint.md
+docs/V1DeviceToleration.md
+docs/V1DownwardAPIProjection.md
+docs/V1DownwardAPIVolumeFile.md
+docs/V1DownwardAPIVolumeSource.md
+docs/V1EmptyDirVolumeSource.md
+docs/V1Endpoint.md
+docs/V1EndpointAddress.md
+docs/V1EndpointConditions.md
+docs/V1EndpointHints.md
+docs/V1EndpointSlice.md
+docs/V1EndpointSliceList.md
+docs/V1EndpointSubset.md
+docs/V1Endpoints.md
+docs/V1EndpointsList.md
+docs/V1EnvFromSource.md
+docs/V1EnvVar.md
+docs/V1EnvVarSource.md
+docs/V1EphemeralContainer.md
+docs/V1EphemeralVolumeSource.md
+docs/V1EventSource.md
+docs/V1Eviction.md
+docs/V1ExactDeviceRequest.md
+docs/V1ExecAction.md
+docs/V1ExemptPriorityLevelConfiguration.md
+docs/V1ExpressionWarning.md
+docs/V1ExternalDocumentation.md
+docs/V1FCVolumeSource.md
+docs/V1FieldSelectorAttributes.md
+docs/V1FieldSelectorRequirement.md
+docs/V1FileKeySelector.md
+docs/V1FlexPersistentVolumeSource.md
+docs/V1FlexVolumeSource.md
+docs/V1FlockerVolumeSource.md
+docs/V1FlowDistinguisherMethod.md
+docs/V1FlowSchema.md
+docs/V1FlowSchemaCondition.md
+docs/V1FlowSchemaList.md
+docs/V1FlowSchemaSpec.md
+docs/V1FlowSchemaStatus.md
+docs/V1ForNode.md
+docs/V1ForZone.md
+docs/V1GCEPersistentDiskVolumeSource.md
+docs/V1GRPCAction.md
+docs/V1GitRepoVolumeSource.md
+docs/V1GlusterfsPersistentVolumeSource.md
+docs/V1GlusterfsVolumeSource.md
+docs/V1GroupResource.md
+docs/V1GroupSubject.md
+docs/V1GroupVersionForDiscovery.md
+docs/V1HTTPGetAction.md
+docs/V1HTTPHeader.md
+docs/V1HTTPIngressPath.md
+docs/V1HTTPIngressRuleValue.md
+docs/V1HorizontalPodAutoscaler.md
+docs/V1HorizontalPodAutoscalerList.md
+docs/V1HorizontalPodAutoscalerSpec.md
+docs/V1HorizontalPodAutoscalerStatus.md
+docs/V1HostAlias.md
+docs/V1HostIP.md
+docs/V1HostPathVolumeSource.md
+docs/V1IPAddress.md
+docs/V1IPAddressList.md
+docs/V1IPAddressSpec.md
+docs/V1IPBlock.md
+docs/V1ISCSIPersistentVolumeSource.md
+docs/V1ISCSIVolumeSource.md
+docs/V1ImageVolumeSource.md
+docs/V1Ingress.md
+docs/V1IngressBackend.md
+docs/V1IngressClass.md
+docs/V1IngressClassList.md
+docs/V1IngressClassParametersReference.md
+docs/V1IngressClassSpec.md
+docs/V1IngressList.md
+docs/V1IngressLoadBalancerIngress.md
+docs/V1IngressLoadBalancerStatus.md
+docs/V1IngressPortStatus.md
+docs/V1IngressRule.md
+docs/V1IngressServiceBackend.md
+docs/V1IngressSpec.md
+docs/V1IngressStatus.md
+docs/V1IngressTLS.md
+docs/V1JSONSchemaProps.md
+docs/V1Job.md
+docs/V1JobCondition.md
+docs/V1JobList.md
+docs/V1JobSpec.md
+docs/V1JobStatus.md
+docs/V1JobTemplateSpec.md
+docs/V1KeyToPath.md
+docs/V1LabelSelector.md
+docs/V1LabelSelectorAttributes.md
+docs/V1LabelSelectorRequirement.md
+docs/V1Lease.md
+docs/V1LeaseList.md
+docs/V1LeaseSpec.md
+docs/V1Lifecycle.md
+docs/V1LifecycleHandler.md
+docs/V1LimitRange.md
+docs/V1LimitRangeItem.md
+docs/V1LimitRangeList.md
+docs/V1LimitRangeSpec.md
+docs/V1LimitResponse.md
+docs/V1LimitedPriorityLevelConfiguration.md
+docs/V1LinuxContainerUser.md
+docs/V1ListMeta.md
+docs/V1LoadBalancerIngress.md
+docs/V1LoadBalancerStatus.md
+docs/V1LocalObjectReference.md
+docs/V1LocalSubjectAccessReview.md
+docs/V1LocalVolumeSource.md
+docs/V1ManagedFieldsEntry.md
+docs/V1MatchCondition.md
+docs/V1MatchResources.md
+docs/V1ModifyVolumeStatus.md
+docs/V1MutatingWebhook.md
+docs/V1MutatingWebhookConfiguration.md
+docs/V1MutatingWebhookConfigurationList.md
+docs/V1NFSVolumeSource.md
+docs/V1NamedRuleWithOperations.md
+docs/V1Namespace.md
+docs/V1NamespaceCondition.md
+docs/V1NamespaceList.md
+docs/V1NamespaceSpec.md
+docs/V1NamespaceStatus.md
+docs/V1NetworkDeviceData.md
+docs/V1NetworkPolicy.md
+docs/V1NetworkPolicyEgressRule.md
+docs/V1NetworkPolicyIngressRule.md
+docs/V1NetworkPolicyList.md
+docs/V1NetworkPolicyPeer.md
+docs/V1NetworkPolicyPort.md
+docs/V1NetworkPolicySpec.md
+docs/V1Node.md
+docs/V1NodeAddress.md
+docs/V1NodeAffinity.md
+docs/V1NodeCondition.md
+docs/V1NodeConfigSource.md
+docs/V1NodeConfigStatus.md
+docs/V1NodeDaemonEndpoints.md
+docs/V1NodeFeatures.md
+docs/V1NodeList.md
+docs/V1NodeRuntimeHandler.md
+docs/V1NodeRuntimeHandlerFeatures.md
+docs/V1NodeSelector.md
+docs/V1NodeSelectorRequirement.md
+docs/V1NodeSelectorTerm.md
+docs/V1NodeSpec.md
+docs/V1NodeStatus.md
+docs/V1NodeSwapStatus.md
+docs/V1NodeSystemInfo.md
+docs/V1NonResourceAttributes.md
+docs/V1NonResourcePolicyRule.md
+docs/V1NonResourceRule.md
+docs/V1ObjectFieldSelector.md
+docs/V1ObjectMeta.md
+docs/V1ObjectReference.md
+docs/V1OpaqueDeviceConfiguration.md
+docs/V1Overhead.md
+docs/V1OwnerReference.md
+docs/V1ParamKind.md
+docs/V1ParamRef.md
+docs/V1ParentReference.md
+docs/V1PersistentVolume.md
+docs/V1PersistentVolumeClaim.md
+docs/V1PersistentVolumeClaimCondition.md
+docs/V1PersistentVolumeClaimList.md
+docs/V1PersistentVolumeClaimSpec.md
+docs/V1PersistentVolumeClaimStatus.md
+docs/V1PersistentVolumeClaimTemplate.md
+docs/V1PersistentVolumeClaimVolumeSource.md
+docs/V1PersistentVolumeList.md
+docs/V1PersistentVolumeSpec.md
+docs/V1PersistentVolumeStatus.md
+docs/V1PhotonPersistentDiskVolumeSource.md
+docs/V1Pod.md
+docs/V1PodAffinity.md
+docs/V1PodAffinityTerm.md
+docs/V1PodAntiAffinity.md
+docs/V1PodCertificateProjection.md
+docs/V1PodCondition.md
+docs/V1PodDNSConfig.md
+docs/V1PodDNSConfigOption.md
+docs/V1PodDisruptionBudget.md
+docs/V1PodDisruptionBudgetList.md
+docs/V1PodDisruptionBudgetSpec.md
+docs/V1PodDisruptionBudgetStatus.md
+docs/V1PodExtendedResourceClaimStatus.md
+docs/V1PodFailurePolicy.md
+docs/V1PodFailurePolicyOnExitCodesRequirement.md
+docs/V1PodFailurePolicyOnPodConditionsPattern.md
+docs/V1PodFailurePolicyRule.md
+docs/V1PodIP.md
+docs/V1PodList.md
+docs/V1PodOS.md
+docs/V1PodReadinessGate.md
+docs/V1PodResourceClaim.md
+docs/V1PodResourceClaimStatus.md
+docs/V1PodSchedulingGate.md
+docs/V1PodSecurityContext.md
+docs/V1PodSpec.md
+docs/V1PodStatus.md
+docs/V1PodTemplate.md
+docs/V1PodTemplateList.md
+docs/V1PodTemplateSpec.md
+docs/V1PolicyRule.md
+docs/V1PolicyRulesWithSubjects.md
+docs/V1PortStatus.md
+docs/V1PortworxVolumeSource.md
+docs/V1Preconditions.md
+docs/V1PreferredSchedulingTerm.md
+docs/V1PriorityClass.md
+docs/V1PriorityClassList.md
+docs/V1PriorityLevelConfiguration.md
+docs/V1PriorityLevelConfigurationCondition.md
+docs/V1PriorityLevelConfigurationList.md
+docs/V1PriorityLevelConfigurationReference.md
+docs/V1PriorityLevelConfigurationSpec.md
+docs/V1PriorityLevelConfigurationStatus.md
+docs/V1Probe.md
+docs/V1ProjectedVolumeSource.md
+docs/V1QueuingConfiguration.md
+docs/V1QuobyteVolumeSource.md
+docs/V1RBDPersistentVolumeSource.md
+docs/V1RBDVolumeSource.md
+docs/V1ReplicaSet.md
+docs/V1ReplicaSetCondition.md
+docs/V1ReplicaSetList.md
+docs/V1ReplicaSetSpec.md
+docs/V1ReplicaSetStatus.md
+docs/V1ReplicationController.md
+docs/V1ReplicationControllerCondition.md
+docs/V1ReplicationControllerList.md
+docs/V1ReplicationControllerSpec.md
+docs/V1ReplicationControllerStatus.md
+docs/V1ResourceAttributes.md
+docs/V1ResourceClaimConsumerReference.md
+docs/V1ResourceClaimList.md
+docs/V1ResourceClaimSpec.md
+docs/V1ResourceClaimStatus.md
+docs/V1ResourceClaimTemplate.md
+docs/V1ResourceClaimTemplateList.md
+docs/V1ResourceClaimTemplateSpec.md
+docs/V1ResourceFieldSelector.md
+docs/V1ResourceHealth.md
+docs/V1ResourcePolicyRule.md
+docs/V1ResourcePool.md
+docs/V1ResourceQuota.md
+docs/V1ResourceQuotaList.md
+docs/V1ResourceQuotaSpec.md
+docs/V1ResourceQuotaStatus.md
+docs/V1ResourceRequirements.md
+docs/V1ResourceRule.md
+docs/V1ResourceSlice.md
+docs/V1ResourceSliceList.md
+docs/V1ResourceSliceSpec.md
+docs/V1ResourceStatus.md
+docs/V1Role.md
+docs/V1RoleBinding.md
+docs/V1RoleBindingList.md
+docs/V1RoleList.md
+docs/V1RoleRef.md
+docs/V1RollingUpdateDaemonSet.md
+docs/V1RollingUpdateDeployment.md
+docs/V1RollingUpdateStatefulSetStrategy.md
+docs/V1RuleWithOperations.md
+docs/V1RuntimeClass.md
+docs/V1RuntimeClassList.md
+docs/V1SELinuxOptions.md
+docs/V1Scale.md
+docs/V1ScaleIOPersistentVolumeSource.md
+docs/V1ScaleIOVolumeSource.md
+docs/V1ScaleSpec.md
+docs/V1ScaleStatus.md
+docs/V1Scheduling.md
+docs/V1ScopeSelector.md
+docs/V1ScopedResourceSelectorRequirement.md
+docs/V1SeccompProfile.md
+docs/V1Secret.md
+docs/V1SecretEnvSource.md
+docs/V1SecretKeySelector.md
+docs/V1SecretList.md
+docs/V1SecretProjection.md
+docs/V1SecretReference.md
+docs/V1SecretVolumeSource.md
+docs/V1SecurityContext.md
+docs/V1SelectableField.md
+docs/V1SelfSubjectAccessReview.md
+docs/V1SelfSubjectAccessReviewSpec.md
+docs/V1SelfSubjectReview.md
+docs/V1SelfSubjectReviewStatus.md
+docs/V1SelfSubjectRulesReview.md
+docs/V1SelfSubjectRulesReviewSpec.md
+docs/V1ServerAddressByClientCIDR.md
+docs/V1Service.md
+docs/V1ServiceAccount.md
+docs/V1ServiceAccountList.md
+docs/V1ServiceAccountSubject.md
+docs/V1ServiceAccountTokenProjection.md
+docs/V1ServiceBackendPort.md
+docs/V1ServiceCIDR.md
+docs/V1ServiceCIDRList.md
+docs/V1ServiceCIDRSpec.md
+docs/V1ServiceCIDRStatus.md
+docs/V1ServiceList.md
+docs/V1ServicePort.md
+docs/V1ServiceSpec.md
+docs/V1ServiceStatus.md
+docs/V1SessionAffinityConfig.md
+docs/V1SleepAction.md
+docs/V1StatefulSet.md
+docs/V1StatefulSetCondition.md
+docs/V1StatefulSetList.md
+docs/V1StatefulSetOrdinals.md
+docs/V1StatefulSetPersistentVolumeClaimRetentionPolicy.md
+docs/V1StatefulSetSpec.md
+docs/V1StatefulSetStatus.md
+docs/V1StatefulSetUpdateStrategy.md
+docs/V1Status.md
+docs/V1StatusCause.md
+docs/V1StatusDetails.md
+docs/V1StorageClass.md
+docs/V1StorageClassList.md
+docs/V1StorageOSPersistentVolumeSource.md
+docs/V1StorageOSVolumeSource.md
+docs/V1SubjectAccessReview.md
+docs/V1SubjectAccessReviewSpec.md
+docs/V1SubjectAccessReviewStatus.md
+docs/V1SubjectRulesReviewStatus.md
+docs/V1SuccessPolicy.md
+docs/V1SuccessPolicyRule.md
+docs/V1Sysctl.md
+docs/V1TCPSocketAction.md
+docs/V1Taint.md
+docs/V1TokenRequestSpec.md
+docs/V1TokenRequestStatus.md
+docs/V1TokenReview.md
+docs/V1TokenReviewSpec.md
+docs/V1TokenReviewStatus.md
+docs/V1Toleration.md
+docs/V1TopologySelectorLabelRequirement.md
+docs/V1TopologySelectorTerm.md
+docs/V1TopologySpreadConstraint.md
+docs/V1TypeChecking.md
+docs/V1TypedLocalObjectReference.md
+docs/V1TypedObjectReference.md
+docs/V1UncountedTerminatedPods.md
+docs/V1UserInfo.md
+docs/V1UserSubject.md
+docs/V1ValidatingAdmissionPolicy.md
+docs/V1ValidatingAdmissionPolicyBinding.md
+docs/V1ValidatingAdmissionPolicyBindingList.md
+docs/V1ValidatingAdmissionPolicyBindingSpec.md
+docs/V1ValidatingAdmissionPolicyList.md
+docs/V1ValidatingAdmissionPolicySpec.md
+docs/V1ValidatingAdmissionPolicyStatus.md
+docs/V1ValidatingWebhook.md
+docs/V1ValidatingWebhookConfiguration.md
+docs/V1ValidatingWebhookConfigurationList.md
+docs/V1Validation.md
+docs/V1ValidationRule.md
+docs/V1Variable.md
+docs/V1Volume.md
+docs/V1VolumeAttachment.md
+docs/V1VolumeAttachmentList.md
+docs/V1VolumeAttachmentSource.md
+docs/V1VolumeAttachmentSpec.md
+docs/V1VolumeAttachmentStatus.md
+docs/V1VolumeAttributesClass.md
+docs/V1VolumeAttributesClassList.md
+docs/V1VolumeDevice.md
+docs/V1VolumeError.md
+docs/V1VolumeMount.md
+docs/V1VolumeMountStatus.md
+docs/V1VolumeNodeAffinity.md
+docs/V1VolumeNodeResources.md
+docs/V1VolumeProjection.md
+docs/V1VolumeResourceRequirements.md
+docs/V1VsphereVirtualDiskVolumeSource.md
+docs/V1WatchEvent.md
+docs/V1WebhookConversion.md
+docs/V1WeightedPodAffinityTerm.md
+docs/V1WindowsSecurityContextOptions.md
+docs/V1WorkloadReference.md
+docs/V1alpha1ApplyConfiguration.md
+docs/V1alpha1ClusterTrustBundle.md
+docs/V1alpha1ClusterTrustBundleList.md
+docs/V1alpha1ClusterTrustBundleSpec.md
+docs/V1alpha1GangSchedulingPolicy.md
+docs/V1alpha1JSONPatch.md
+docs/V1alpha1MatchCondition.md
+docs/V1alpha1MatchResources.md
+docs/V1alpha1MutatingAdmissionPolicy.md
+docs/V1alpha1MutatingAdmissionPolicyBinding.md
+docs/V1alpha1MutatingAdmissionPolicyBindingList.md
+docs/V1alpha1MutatingAdmissionPolicyBindingSpec.md
+docs/V1alpha1MutatingAdmissionPolicyList.md
+docs/V1alpha1MutatingAdmissionPolicySpec.md
+docs/V1alpha1Mutation.md
+docs/V1alpha1NamedRuleWithOperations.md
+docs/V1alpha1ParamKind.md
+docs/V1alpha1ParamRef.md
+docs/V1alpha1PodGroup.md
+docs/V1alpha1PodGroupPolicy.md
+docs/V1alpha1ServerStorageVersion.md
+docs/V1alpha1StorageVersion.md
+docs/V1alpha1StorageVersionCondition.md
+docs/V1alpha1StorageVersionList.md
+docs/V1alpha1StorageVersionStatus.md
+docs/V1alpha1TypedLocalObjectReference.md
+docs/V1alpha1Variable.md
+docs/V1alpha1Workload.md
+docs/V1alpha1WorkloadList.md
+docs/V1alpha1WorkloadSpec.md
+docs/V1alpha2LeaseCandidate.md
+docs/V1alpha2LeaseCandidateList.md
+docs/V1alpha2LeaseCandidateSpec.md
+docs/V1alpha3DeviceTaint.md
+docs/V1alpha3DeviceTaintRule.md
+docs/V1alpha3DeviceTaintRuleList.md
+docs/V1alpha3DeviceTaintRuleSpec.md
+docs/V1alpha3DeviceTaintRuleStatus.md
+docs/V1alpha3DeviceTaintSelector.md
+docs/V1beta1AllocatedDeviceStatus.md
+docs/V1beta1AllocationResult.md
+docs/V1beta1ApplyConfiguration.md
+docs/V1beta1BasicDevice.md
+docs/V1beta1CELDeviceSelector.md
+docs/V1beta1CapacityRequestPolicy.md
+docs/V1beta1CapacityRequestPolicyRange.md
+docs/V1beta1CapacityRequirements.md
+docs/V1beta1ClusterTrustBundle.md
+docs/V1beta1ClusterTrustBundleList.md
+docs/V1beta1ClusterTrustBundleSpec.md
+docs/V1beta1Counter.md
+docs/V1beta1CounterSet.md
+docs/V1beta1Device.md
+docs/V1beta1DeviceAllocationConfiguration.md
+docs/V1beta1DeviceAllocationResult.md
+docs/V1beta1DeviceAttribute.md
+docs/V1beta1DeviceCapacity.md
+docs/V1beta1DeviceClaim.md
+docs/V1beta1DeviceClaimConfiguration.md
+docs/V1beta1DeviceClass.md
+docs/V1beta1DeviceClassConfiguration.md
+docs/V1beta1DeviceClassList.md
+docs/V1beta1DeviceClassSpec.md
+docs/V1beta1DeviceConstraint.md
+docs/V1beta1DeviceCounterConsumption.md
+docs/V1beta1DeviceRequest.md
+docs/V1beta1DeviceRequestAllocationResult.md
+docs/V1beta1DeviceSelector.md
+docs/V1beta1DeviceSubRequest.md
+docs/V1beta1DeviceTaint.md
+docs/V1beta1DeviceToleration.md
+docs/V1beta1IPAddress.md
+docs/V1beta1IPAddressList.md
+docs/V1beta1IPAddressSpec.md
+docs/V1beta1JSONPatch.md
+docs/V1beta1LeaseCandidate.md
+docs/V1beta1LeaseCandidateList.md
+docs/V1beta1LeaseCandidateSpec.md
+docs/V1beta1MatchCondition.md
+docs/V1beta1MatchResources.md
+docs/V1beta1MutatingAdmissionPolicy.md
+docs/V1beta1MutatingAdmissionPolicyBinding.md
+docs/V1beta1MutatingAdmissionPolicyBindingList.md
+docs/V1beta1MutatingAdmissionPolicyBindingSpec.md
+docs/V1beta1MutatingAdmissionPolicyList.md
+docs/V1beta1MutatingAdmissionPolicySpec.md
+docs/V1beta1Mutation.md
+docs/V1beta1NamedRuleWithOperations.md
+docs/V1beta1NetworkDeviceData.md
+docs/V1beta1OpaqueDeviceConfiguration.md
+docs/V1beta1ParamKind.md
+docs/V1beta1ParamRef.md
+docs/V1beta1ParentReference.md
+docs/V1beta1PodCertificateRequest.md
+docs/V1beta1PodCertificateRequestList.md
+docs/V1beta1PodCertificateRequestSpec.md
+docs/V1beta1PodCertificateRequestStatus.md
+docs/V1beta1ResourceClaim.md
+docs/V1beta1ResourceClaimConsumerReference.md
+docs/V1beta1ResourceClaimList.md
+docs/V1beta1ResourceClaimSpec.md
+docs/V1beta1ResourceClaimStatus.md
+docs/V1beta1ResourceClaimTemplate.md
+docs/V1beta1ResourceClaimTemplateList.md
+docs/V1beta1ResourceClaimTemplateSpec.md
+docs/V1beta1ResourcePool.md
+docs/V1beta1ResourceSlice.md
+docs/V1beta1ResourceSliceList.md
+docs/V1beta1ResourceSliceSpec.md
+docs/V1beta1ServiceCIDR.md
+docs/V1beta1ServiceCIDRList.md
+docs/V1beta1ServiceCIDRSpec.md
+docs/V1beta1ServiceCIDRStatus.md
+docs/V1beta1StorageVersionMigration.md
+docs/V1beta1StorageVersionMigrationList.md
+docs/V1beta1StorageVersionMigrationSpec.md
+docs/V1beta1StorageVersionMigrationStatus.md
+docs/V1beta1Variable.md
+docs/V1beta1VolumeAttributesClass.md
+docs/V1beta1VolumeAttributesClassList.md
+docs/V1beta2AllocatedDeviceStatus.md
+docs/V1beta2AllocationResult.md
+docs/V1beta2CELDeviceSelector.md
+docs/V1beta2CapacityRequestPolicy.md
+docs/V1beta2CapacityRequestPolicyRange.md
+docs/V1beta2CapacityRequirements.md
+docs/V1beta2Counter.md
+docs/V1beta2CounterSet.md
+docs/V1beta2Device.md
+docs/V1beta2DeviceAllocationConfiguration.md
+docs/V1beta2DeviceAllocationResult.md
+docs/V1beta2DeviceAttribute.md
+docs/V1beta2DeviceCapacity.md
+docs/V1beta2DeviceClaim.md
+docs/V1beta2DeviceClaimConfiguration.md
+docs/V1beta2DeviceClass.md
+docs/V1beta2DeviceClassConfiguration.md
+docs/V1beta2DeviceClassList.md
+docs/V1beta2DeviceClassSpec.md
+docs/V1beta2DeviceConstraint.md
+docs/V1beta2DeviceCounterConsumption.md
+docs/V1beta2DeviceRequest.md
+docs/V1beta2DeviceRequestAllocationResult.md
+docs/V1beta2DeviceSelector.md
+docs/V1beta2DeviceSubRequest.md
+docs/V1beta2DeviceTaint.md
+docs/V1beta2DeviceToleration.md
+docs/V1beta2ExactDeviceRequest.md
+docs/V1beta2NetworkDeviceData.md
+docs/V1beta2OpaqueDeviceConfiguration.md
+docs/V1beta2ResourceClaim.md
+docs/V1beta2ResourceClaimConsumerReference.md
+docs/V1beta2ResourceClaimList.md
+docs/V1beta2ResourceClaimSpec.md
+docs/V1beta2ResourceClaimStatus.md
+docs/V1beta2ResourceClaimTemplate.md
+docs/V1beta2ResourceClaimTemplateList.md
+docs/V1beta2ResourceClaimTemplateSpec.md
+docs/V1beta2ResourcePool.md
+docs/V1beta2ResourceSlice.md
+docs/V1beta2ResourceSliceList.md
+docs/V1beta2ResourceSliceSpec.md
+docs/V2APIGroupDiscovery.md
+docs/V2APIGroupDiscoveryList.md
+docs/V2APIResourceDiscovery.md
+docs/V2APISubresourceDiscovery.md
+docs/V2APIVersionDiscovery.md
+docs/V2ContainerResourceMetricSource.md
+docs/V2ContainerResourceMetricStatus.md
+docs/V2CrossVersionObjectReference.md
+docs/V2ExternalMetricSource.md
+docs/V2ExternalMetricStatus.md
+docs/V2HPAScalingPolicy.md
+docs/V2HPAScalingRules.md
+docs/V2HorizontalPodAutoscaler.md
+docs/V2HorizontalPodAutoscalerBehavior.md
+docs/V2HorizontalPodAutoscalerCondition.md
+docs/V2HorizontalPodAutoscalerList.md
+docs/V2HorizontalPodAutoscalerSpec.md
+docs/V2HorizontalPodAutoscalerStatus.md
+docs/V2MetricIdentifier.md
+docs/V2MetricSpec.md
+docs/V2MetricStatus.md
+docs/V2MetricTarget.md
+docs/V2MetricValueStatus.md
+docs/V2ObjectMetricSource.md
+docs/V2ObjectMetricStatus.md
+docs/V2PodsMetricSource.md
+docs/V2PodsMetricStatus.md
+docs/V2ResourceMetricSource.md
+docs/V2ResourceMetricStatus.md
+docs/V2beta1APIGroupDiscovery.md
+docs/V2beta1APIGroupDiscoveryList.md
+docs/V2beta1APIResourceDiscovery.md
+docs/V2beta1APISubresourceDiscovery.md
+docs/V2beta1APIVersionDiscovery.md
+docs/VersionApi.md
+docs/VersionInfo.md
+docs/WellKnownApi.md
+git_push.sh
+requirements.txt
+setup.cfg
+setup.py
+test-requirements.txt
+test/__init__.py
+test/test_admissionregistration_api.py
+test/test_admissionregistration_v1_api.py
+test/test_admissionregistration_v1_service_reference.py
+test/test_admissionregistration_v1_webhook_client_config.py
+test/test_admissionregistration_v1alpha1_api.py
+test/test_admissionregistration_v1beta1_api.py
+test/test_apiextensions_api.py
+test/test_apiextensions_v1_api.py
+test/test_apiextensions_v1_service_reference.py
+test/test_apiextensions_v1_webhook_client_config.py
+test/test_apiregistration_api.py
+test/test_apiregistration_v1_api.py
+test/test_apiregistration_v1_service_reference.py
+test/test_apis_api.py
+test/test_apps_api.py
+test/test_apps_v1_api.py
+test/test_authentication_api.py
+test/test_authentication_v1_api.py
+test/test_authentication_v1_token_request.py
+test/test_authorization_api.py
+test/test_authorization_v1_api.py
+test/test_autoscaling_api.py
+test/test_autoscaling_v1_api.py
+test/test_autoscaling_v2_api.py
+test/test_batch_api.py
+test/test_batch_v1_api.py
+test/test_certificates_api.py
+test/test_certificates_v1_api.py
+test/test_certificates_v1alpha1_api.py
+test/test_certificates_v1beta1_api.py
+test/test_coordination_api.py
+test/test_coordination_v1_api.py
+test/test_coordination_v1alpha2_api.py
+test/test_coordination_v1beta1_api.py
+test/test_core_api.py
+test/test_core_v1_api.py
+test/test_core_v1_endpoint_port.py
+test/test_core_v1_event.py
+test/test_core_v1_event_list.py
+test/test_core_v1_event_series.py
+test/test_core_v1_resource_claim.py
+test/test_custom_objects_api.py
+test/test_discovery_api.py
+test/test_discovery_v1_api.py
+test/test_discovery_v1_endpoint_port.py
+test/test_events_api.py
+test/test_events_v1_api.py
+test/test_events_v1_event.py
+test/test_events_v1_event_list.py
+test/test_events_v1_event_series.py
+test/test_flowcontrol_apiserver_api.py
+test/test_flowcontrol_apiserver_v1_api.py
+test/test_flowcontrol_v1_subject.py
+test/test_internal_apiserver_api.py
+test/test_internal_apiserver_v1alpha1_api.py
+test/test_logs_api.py
+test/test_networking_api.py
+test/test_networking_v1_api.py
+test/test_networking_v1beta1_api.py
+test/test_node_api.py
+test/test_node_v1_api.py
+test/test_openid_api.py
+test/test_policy_api.py
+test/test_policy_v1_api.py
+test/test_rbac_authorization_api.py
+test/test_rbac_authorization_v1_api.py
+test/test_rbac_v1_subject.py
+test/test_resource_api.py
+test/test_resource_v1_api.py
+test/test_resource_v1_resource_claim.py
+test/test_resource_v1alpha3_api.py
+test/test_resource_v1beta1_api.py
+test/test_resource_v1beta2_api.py
+test/test_scheduling_api.py
+test/test_scheduling_v1_api.py
+test/test_scheduling_v1alpha1_api.py
+test/test_storage_api.py
+test/test_storage_v1_api.py
+test/test_storage_v1_token_request.py
+test/test_storage_v1beta1_api.py
+test/test_storagemigration_api.py
+test/test_storagemigration_v1beta1_api.py
+test/test_v1_affinity.py
+test/test_v1_aggregation_rule.py
+test/test_v1_allocated_device_status.py
+test/test_v1_allocation_result.py
+test/test_v1_api_group.py
+test/test_v1_api_group_list.py
+test/test_v1_api_resource.py
+test/test_v1_api_resource_list.py
+test/test_v1_api_service.py
+test/test_v1_api_service_condition.py
+test/test_v1_api_service_list.py
+test/test_v1_api_service_spec.py
+test/test_v1_api_service_status.py
+test/test_v1_api_versions.py
+test/test_v1_app_armor_profile.py
+test/test_v1_attached_volume.py
+test/test_v1_audit_annotation.py
+test/test_v1_aws_elastic_block_store_volume_source.py
+test/test_v1_azure_disk_volume_source.py
+test/test_v1_azure_file_persistent_volume_source.py
+test/test_v1_azure_file_volume_source.py
+test/test_v1_binding.py
+test/test_v1_bound_object_reference.py
+test/test_v1_capabilities.py
+test/test_v1_capacity_request_policy.py
+test/test_v1_capacity_request_policy_range.py
+test/test_v1_capacity_requirements.py
+test/test_v1_cel_device_selector.py
+test/test_v1_ceph_fs_persistent_volume_source.py
+test/test_v1_ceph_fs_volume_source.py
+test/test_v1_certificate_signing_request.py
+test/test_v1_certificate_signing_request_condition.py
+test/test_v1_certificate_signing_request_list.py
+test/test_v1_certificate_signing_request_spec.py
+test/test_v1_certificate_signing_request_status.py
+test/test_v1_cinder_persistent_volume_source.py
+test/test_v1_cinder_volume_source.py
+test/test_v1_client_ip_config.py
+test/test_v1_cluster_role.py
+test/test_v1_cluster_role_binding.py
+test/test_v1_cluster_role_binding_list.py
+test/test_v1_cluster_role_list.py
+test/test_v1_cluster_trust_bundle_projection.py
+test/test_v1_component_condition.py
+test/test_v1_component_status.py
+test/test_v1_component_status_list.py
+test/test_v1_condition.py
+test/test_v1_config_map.py
+test/test_v1_config_map_env_source.py
+test/test_v1_config_map_key_selector.py
+test/test_v1_config_map_list.py
+test/test_v1_config_map_node_config_source.py
+test/test_v1_config_map_projection.py
+test/test_v1_config_map_volume_source.py
+test/test_v1_container.py
+test/test_v1_container_extended_resource_request.py
+test/test_v1_container_image.py
+test/test_v1_container_port.py
+test/test_v1_container_resize_policy.py
+test/test_v1_container_restart_rule.py
+test/test_v1_container_restart_rule_on_exit_codes.py
+test/test_v1_container_state.py
+test/test_v1_container_state_running.py
+test/test_v1_container_state_terminated.py
+test/test_v1_container_state_waiting.py
+test/test_v1_container_status.py
+test/test_v1_container_user.py
+test/test_v1_controller_revision.py
+test/test_v1_controller_revision_list.py
+test/test_v1_counter.py
+test/test_v1_counter_set.py
+test/test_v1_cron_job.py
+test/test_v1_cron_job_list.py
+test/test_v1_cron_job_spec.py
+test/test_v1_cron_job_status.py
+test/test_v1_cross_version_object_reference.py
+test/test_v1_csi_driver.py
+test/test_v1_csi_driver_list.py
+test/test_v1_csi_driver_spec.py
+test/test_v1_csi_node.py
+test/test_v1_csi_node_driver.py
+test/test_v1_csi_node_list.py
+test/test_v1_csi_node_spec.py
+test/test_v1_csi_persistent_volume_source.py
+test/test_v1_csi_storage_capacity.py
+test/test_v1_csi_storage_capacity_list.py
+test/test_v1_csi_volume_source.py
+test/test_v1_custom_resource_column_definition.py
+test/test_v1_custom_resource_conversion.py
+test/test_v1_custom_resource_definition.py
+test/test_v1_custom_resource_definition_condition.py
+test/test_v1_custom_resource_definition_list.py
+test/test_v1_custom_resource_definition_names.py
+test/test_v1_custom_resource_definition_spec.py
+test/test_v1_custom_resource_definition_status.py
+test/test_v1_custom_resource_definition_version.py
+test/test_v1_custom_resource_subresource_scale.py
+test/test_v1_custom_resource_subresources.py
+test/test_v1_custom_resource_validation.py
+test/test_v1_daemon_endpoint.py
+test/test_v1_daemon_set.py
+test/test_v1_daemon_set_condition.py
+test/test_v1_daemon_set_list.py
+test/test_v1_daemon_set_spec.py
+test/test_v1_daemon_set_status.py
+test/test_v1_daemon_set_update_strategy.py
+test/test_v1_delete_options.py
+test/test_v1_deployment.py
+test/test_v1_deployment_condition.py
+test/test_v1_deployment_list.py
+test/test_v1_deployment_spec.py
+test/test_v1_deployment_status.py
+test/test_v1_deployment_strategy.py
+test/test_v1_device.py
+test/test_v1_device_allocation_configuration.py
+test/test_v1_device_allocation_result.py
+test/test_v1_device_attribute.py
+test/test_v1_device_capacity.py
+test/test_v1_device_claim.py
+test/test_v1_device_claim_configuration.py
+test/test_v1_device_class.py
+test/test_v1_device_class_configuration.py
+test/test_v1_device_class_list.py
+test/test_v1_device_class_spec.py
+test/test_v1_device_constraint.py
+test/test_v1_device_counter_consumption.py
+test/test_v1_device_request.py
+test/test_v1_device_request_allocation_result.py
+test/test_v1_device_selector.py
+test/test_v1_device_sub_request.py
+test/test_v1_device_taint.py
+test/test_v1_device_toleration.py
+test/test_v1_downward_api_projection.py
+test/test_v1_downward_api_volume_file.py
+test/test_v1_downward_api_volume_source.py
+test/test_v1_empty_dir_volume_source.py
+test/test_v1_endpoint.py
+test/test_v1_endpoint_address.py
+test/test_v1_endpoint_conditions.py
+test/test_v1_endpoint_hints.py
+test/test_v1_endpoint_slice.py
+test/test_v1_endpoint_slice_list.py
+test/test_v1_endpoint_subset.py
+test/test_v1_endpoints.py
+test/test_v1_endpoints_list.py
+test/test_v1_env_from_source.py
+test/test_v1_env_var.py
+test/test_v1_env_var_source.py
+test/test_v1_ephemeral_container.py
+test/test_v1_ephemeral_volume_source.py
+test/test_v1_event_source.py
+test/test_v1_eviction.py
+test/test_v1_exact_device_request.py
+test/test_v1_exec_action.py
+test/test_v1_exempt_priority_level_configuration.py
+test/test_v1_expression_warning.py
+test/test_v1_external_documentation.py
+test/test_v1_fc_volume_source.py
+test/test_v1_field_selector_attributes.py
+test/test_v1_field_selector_requirement.py
+test/test_v1_file_key_selector.py
+test/test_v1_flex_persistent_volume_source.py
+test/test_v1_flex_volume_source.py
+test/test_v1_flocker_volume_source.py
+test/test_v1_flow_distinguisher_method.py
+test/test_v1_flow_schema.py
+test/test_v1_flow_schema_condition.py
+test/test_v1_flow_schema_list.py
+test/test_v1_flow_schema_spec.py
+test/test_v1_flow_schema_status.py
+test/test_v1_for_node.py
+test/test_v1_for_zone.py
+test/test_v1_gce_persistent_disk_volume_source.py
+test/test_v1_git_repo_volume_source.py
+test/test_v1_glusterfs_persistent_volume_source.py
+test/test_v1_glusterfs_volume_source.py
+test/test_v1_group_resource.py
+test/test_v1_group_subject.py
+test/test_v1_group_version_for_discovery.py
+test/test_v1_grpc_action.py
+test/test_v1_horizontal_pod_autoscaler.py
+test/test_v1_horizontal_pod_autoscaler_list.py
+test/test_v1_horizontal_pod_autoscaler_spec.py
+test/test_v1_horizontal_pod_autoscaler_status.py
+test/test_v1_host_alias.py
+test/test_v1_host_ip.py
+test/test_v1_host_path_volume_source.py
+test/test_v1_http_get_action.py
+test/test_v1_http_header.py
+test/test_v1_http_ingress_path.py
+test/test_v1_http_ingress_rule_value.py
+test/test_v1_image_volume_source.py
+test/test_v1_ingress.py
+test/test_v1_ingress_backend.py
+test/test_v1_ingress_class.py
+test/test_v1_ingress_class_list.py
+test/test_v1_ingress_class_parameters_reference.py
+test/test_v1_ingress_class_spec.py
+test/test_v1_ingress_list.py
+test/test_v1_ingress_load_balancer_ingress.py
+test/test_v1_ingress_load_balancer_status.py
+test/test_v1_ingress_port_status.py
+test/test_v1_ingress_rule.py
+test/test_v1_ingress_service_backend.py
+test/test_v1_ingress_spec.py
+test/test_v1_ingress_status.py
+test/test_v1_ingress_tls.py
+test/test_v1_ip_address.py
+test/test_v1_ip_address_list.py
+test/test_v1_ip_address_spec.py
+test/test_v1_ip_block.py
+test/test_v1_iscsi_persistent_volume_source.py
+test/test_v1_iscsi_volume_source.py
+test/test_v1_job.py
+test/test_v1_job_condition.py
+test/test_v1_job_list.py
+test/test_v1_job_spec.py
+test/test_v1_job_status.py
+test/test_v1_job_template_spec.py
+test/test_v1_json_schema_props.py
+test/test_v1_key_to_path.py
+test/test_v1_label_selector.py
+test/test_v1_label_selector_attributes.py
+test/test_v1_label_selector_requirement.py
+test/test_v1_lease.py
+test/test_v1_lease_list.py
+test/test_v1_lease_spec.py
+test/test_v1_lifecycle.py
+test/test_v1_lifecycle_handler.py
+test/test_v1_limit_range.py
+test/test_v1_limit_range_item.py
+test/test_v1_limit_range_list.py
+test/test_v1_limit_range_spec.py
+test/test_v1_limit_response.py
+test/test_v1_limited_priority_level_configuration.py
+test/test_v1_linux_container_user.py
+test/test_v1_list_meta.py
+test/test_v1_load_balancer_ingress.py
+test/test_v1_load_balancer_status.py
+test/test_v1_local_object_reference.py
+test/test_v1_local_subject_access_review.py
+test/test_v1_local_volume_source.py
+test/test_v1_managed_fields_entry.py
+test/test_v1_match_condition.py
+test/test_v1_match_resources.py
+test/test_v1_modify_volume_status.py
+test/test_v1_mutating_webhook.py
+test/test_v1_mutating_webhook_configuration.py
+test/test_v1_mutating_webhook_configuration_list.py
+test/test_v1_named_rule_with_operations.py
+test/test_v1_namespace.py
+test/test_v1_namespace_condition.py
+test/test_v1_namespace_list.py
+test/test_v1_namespace_spec.py
+test/test_v1_namespace_status.py
+test/test_v1_network_device_data.py
+test/test_v1_network_policy.py
+test/test_v1_network_policy_egress_rule.py
+test/test_v1_network_policy_ingress_rule.py
+test/test_v1_network_policy_list.py
+test/test_v1_network_policy_peer.py
+test/test_v1_network_policy_port.py
+test/test_v1_network_policy_spec.py
+test/test_v1_nfs_volume_source.py
+test/test_v1_node.py
+test/test_v1_node_address.py
+test/test_v1_node_affinity.py
+test/test_v1_node_condition.py
+test/test_v1_node_config_source.py
+test/test_v1_node_config_status.py
+test/test_v1_node_daemon_endpoints.py
+test/test_v1_node_features.py
+test/test_v1_node_list.py
+test/test_v1_node_runtime_handler.py
+test/test_v1_node_runtime_handler_features.py
+test/test_v1_node_selector.py
+test/test_v1_node_selector_requirement.py
+test/test_v1_node_selector_term.py
+test/test_v1_node_spec.py
+test/test_v1_node_status.py
+test/test_v1_node_swap_status.py
+test/test_v1_node_system_info.py
+test/test_v1_non_resource_attributes.py
+test/test_v1_non_resource_policy_rule.py
+test/test_v1_non_resource_rule.py
+test/test_v1_object_field_selector.py
+test/test_v1_object_meta.py
+test/test_v1_object_reference.py
+test/test_v1_opaque_device_configuration.py
+test/test_v1_overhead.py
+test/test_v1_owner_reference.py
+test/test_v1_param_kind.py
+test/test_v1_param_ref.py
+test/test_v1_parent_reference.py
+test/test_v1_persistent_volume.py
+test/test_v1_persistent_volume_claim.py
+test/test_v1_persistent_volume_claim_condition.py
+test/test_v1_persistent_volume_claim_list.py
+test/test_v1_persistent_volume_claim_spec.py
+test/test_v1_persistent_volume_claim_status.py
+test/test_v1_persistent_volume_claim_template.py
+test/test_v1_persistent_volume_claim_volume_source.py
+test/test_v1_persistent_volume_list.py
+test/test_v1_persistent_volume_spec.py
+test/test_v1_persistent_volume_status.py
+test/test_v1_photon_persistent_disk_volume_source.py
+test/test_v1_pod.py
+test/test_v1_pod_affinity.py
+test/test_v1_pod_affinity_term.py
+test/test_v1_pod_anti_affinity.py
+test/test_v1_pod_certificate_projection.py
+test/test_v1_pod_condition.py
+test/test_v1_pod_disruption_budget.py
+test/test_v1_pod_disruption_budget_list.py
+test/test_v1_pod_disruption_budget_spec.py
+test/test_v1_pod_disruption_budget_status.py
+test/test_v1_pod_dns_config.py
+test/test_v1_pod_dns_config_option.py
+test/test_v1_pod_extended_resource_claim_status.py
+test/test_v1_pod_failure_policy.py
+test/test_v1_pod_failure_policy_on_exit_codes_requirement.py
+test/test_v1_pod_failure_policy_on_pod_conditions_pattern.py
+test/test_v1_pod_failure_policy_rule.py
+test/test_v1_pod_ip.py
+test/test_v1_pod_list.py
+test/test_v1_pod_os.py
+test/test_v1_pod_readiness_gate.py
+test/test_v1_pod_resource_claim.py
+test/test_v1_pod_resource_claim_status.py
+test/test_v1_pod_scheduling_gate.py
+test/test_v1_pod_security_context.py
+test/test_v1_pod_spec.py
+test/test_v1_pod_status.py
+test/test_v1_pod_template.py
+test/test_v1_pod_template_list.py
+test/test_v1_pod_template_spec.py
+test/test_v1_policy_rule.py
+test/test_v1_policy_rules_with_subjects.py
+test/test_v1_port_status.py
+test/test_v1_portworx_volume_source.py
+test/test_v1_preconditions.py
+test/test_v1_preferred_scheduling_term.py
+test/test_v1_priority_class.py
+test/test_v1_priority_class_list.py
+test/test_v1_priority_level_configuration.py
+test/test_v1_priority_level_configuration_condition.py
+test/test_v1_priority_level_configuration_list.py
+test/test_v1_priority_level_configuration_reference.py
+test/test_v1_priority_level_configuration_spec.py
+test/test_v1_priority_level_configuration_status.py
+test/test_v1_probe.py
+test/test_v1_projected_volume_source.py
+test/test_v1_queuing_configuration.py
+test/test_v1_quobyte_volume_source.py
+test/test_v1_rbd_persistent_volume_source.py
+test/test_v1_rbd_volume_source.py
+test/test_v1_replica_set.py
+test/test_v1_replica_set_condition.py
+test/test_v1_replica_set_list.py
+test/test_v1_replica_set_spec.py
+test/test_v1_replica_set_status.py
+test/test_v1_replication_controller.py
+test/test_v1_replication_controller_condition.py
+test/test_v1_replication_controller_list.py
+test/test_v1_replication_controller_spec.py
+test/test_v1_replication_controller_status.py
+test/test_v1_resource_attributes.py
+test/test_v1_resource_claim_consumer_reference.py
+test/test_v1_resource_claim_list.py
+test/test_v1_resource_claim_spec.py
+test/test_v1_resource_claim_status.py
+test/test_v1_resource_claim_template.py
+test/test_v1_resource_claim_template_list.py
+test/test_v1_resource_claim_template_spec.py
+test/test_v1_resource_field_selector.py
+test/test_v1_resource_health.py
+test/test_v1_resource_policy_rule.py
+test/test_v1_resource_pool.py
+test/test_v1_resource_quota.py
+test/test_v1_resource_quota_list.py
+test/test_v1_resource_quota_spec.py
+test/test_v1_resource_quota_status.py
+test/test_v1_resource_requirements.py
+test/test_v1_resource_rule.py
+test/test_v1_resource_slice.py
+test/test_v1_resource_slice_list.py
+test/test_v1_resource_slice_spec.py
+test/test_v1_resource_status.py
+test/test_v1_role.py
+test/test_v1_role_binding.py
+test/test_v1_role_binding_list.py
+test/test_v1_role_list.py
+test/test_v1_role_ref.py
+test/test_v1_rolling_update_daemon_set.py
+test/test_v1_rolling_update_deployment.py
+test/test_v1_rolling_update_stateful_set_strategy.py
+test/test_v1_rule_with_operations.py
+test/test_v1_runtime_class.py
+test/test_v1_runtime_class_list.py
+test/test_v1_scale.py
+test/test_v1_scale_io_persistent_volume_source.py
+test/test_v1_scale_io_volume_source.py
+test/test_v1_scale_spec.py
+test/test_v1_scale_status.py
+test/test_v1_scheduling.py
+test/test_v1_scope_selector.py
+test/test_v1_scoped_resource_selector_requirement.py
+test/test_v1_se_linux_options.py
+test/test_v1_seccomp_profile.py
+test/test_v1_secret.py
+test/test_v1_secret_env_source.py
+test/test_v1_secret_key_selector.py
+test/test_v1_secret_list.py
+test/test_v1_secret_projection.py
+test/test_v1_secret_reference.py
+test/test_v1_secret_volume_source.py
+test/test_v1_security_context.py
+test/test_v1_selectable_field.py
+test/test_v1_self_subject_access_review.py
+test/test_v1_self_subject_access_review_spec.py
+test/test_v1_self_subject_review.py
+test/test_v1_self_subject_review_status.py
+test/test_v1_self_subject_rules_review.py
+test/test_v1_self_subject_rules_review_spec.py
+test/test_v1_server_address_by_client_cidr.py
+test/test_v1_service.py
+test/test_v1_service_account.py
+test/test_v1_service_account_list.py
+test/test_v1_service_account_subject.py
+test/test_v1_service_account_token_projection.py
+test/test_v1_service_backend_port.py
+test/test_v1_service_cidr.py
+test/test_v1_service_cidr_list.py
+test/test_v1_service_cidr_spec.py
+test/test_v1_service_cidr_status.py
+test/test_v1_service_list.py
+test/test_v1_service_port.py
+test/test_v1_service_spec.py
+test/test_v1_service_status.py
+test/test_v1_session_affinity_config.py
+test/test_v1_sleep_action.py
+test/test_v1_stateful_set.py
+test/test_v1_stateful_set_condition.py
+test/test_v1_stateful_set_list.py
+test/test_v1_stateful_set_ordinals.py
+test/test_v1_stateful_set_persistent_volume_claim_retention_policy.py
+test/test_v1_stateful_set_spec.py
+test/test_v1_stateful_set_status.py
+test/test_v1_stateful_set_update_strategy.py
+test/test_v1_status.py
+test/test_v1_status_cause.py
+test/test_v1_status_details.py
+test/test_v1_storage_class.py
+test/test_v1_storage_class_list.py
+test/test_v1_storage_os_persistent_volume_source.py
+test/test_v1_storage_os_volume_source.py
+test/test_v1_subject_access_review.py
+test/test_v1_subject_access_review_spec.py
+test/test_v1_subject_access_review_status.py
+test/test_v1_subject_rules_review_status.py
+test/test_v1_success_policy.py
+test/test_v1_success_policy_rule.py
+test/test_v1_sysctl.py
+test/test_v1_taint.py
+test/test_v1_tcp_socket_action.py
+test/test_v1_token_request_spec.py
+test/test_v1_token_request_status.py
+test/test_v1_token_review.py
+test/test_v1_token_review_spec.py
+test/test_v1_token_review_status.py
+test/test_v1_toleration.py
+test/test_v1_topology_selector_label_requirement.py
+test/test_v1_topology_selector_term.py
+test/test_v1_topology_spread_constraint.py
+test/test_v1_type_checking.py
+test/test_v1_typed_local_object_reference.py
+test/test_v1_typed_object_reference.py
+test/test_v1_uncounted_terminated_pods.py
+test/test_v1_user_info.py
+test/test_v1_user_subject.py
+test/test_v1_validating_admission_policy.py
+test/test_v1_validating_admission_policy_binding.py
+test/test_v1_validating_admission_policy_binding_list.py
+test/test_v1_validating_admission_policy_binding_spec.py
+test/test_v1_validating_admission_policy_list.py
+test/test_v1_validating_admission_policy_spec.py
+test/test_v1_validating_admission_policy_status.py
+test/test_v1_validating_webhook.py
+test/test_v1_validating_webhook_configuration.py
+test/test_v1_validating_webhook_configuration_list.py
+test/test_v1_validation.py
+test/test_v1_validation_rule.py
+test/test_v1_variable.py
+test/test_v1_volume.py
+test/test_v1_volume_attachment.py
+test/test_v1_volume_attachment_list.py
+test/test_v1_volume_attachment_source.py
+test/test_v1_volume_attachment_spec.py
+test/test_v1_volume_attachment_status.py
+test/test_v1_volume_attributes_class.py
+test/test_v1_volume_attributes_class_list.py
+test/test_v1_volume_device.py
+test/test_v1_volume_error.py
+test/test_v1_volume_mount.py
+test/test_v1_volume_mount_status.py
+test/test_v1_volume_node_affinity.py
+test/test_v1_volume_node_resources.py
+test/test_v1_volume_projection.py
+test/test_v1_volume_resource_requirements.py
+test/test_v1_vsphere_virtual_disk_volume_source.py
+test/test_v1_watch_event.py
+test/test_v1_webhook_conversion.py
+test/test_v1_weighted_pod_affinity_term.py
+test/test_v1_windows_security_context_options.py
+test/test_v1_workload_reference.py
+test/test_v1alpha1_apply_configuration.py
+test/test_v1alpha1_cluster_trust_bundle.py
+test/test_v1alpha1_cluster_trust_bundle_list.py
+test/test_v1alpha1_cluster_trust_bundle_spec.py
+test/test_v1alpha1_gang_scheduling_policy.py
+test/test_v1alpha1_json_patch.py
+test/test_v1alpha1_match_condition.py
+test/test_v1alpha1_match_resources.py
+test/test_v1alpha1_mutating_admission_policy.py
+test/test_v1alpha1_mutating_admission_policy_binding.py
+test/test_v1alpha1_mutating_admission_policy_binding_list.py
+test/test_v1alpha1_mutating_admission_policy_binding_spec.py
+test/test_v1alpha1_mutating_admission_policy_list.py
+test/test_v1alpha1_mutating_admission_policy_spec.py
+test/test_v1alpha1_mutation.py
+test/test_v1alpha1_named_rule_with_operations.py
+test/test_v1alpha1_param_kind.py
+test/test_v1alpha1_param_ref.py
+test/test_v1alpha1_pod_group.py
+test/test_v1alpha1_pod_group_policy.py
+test/test_v1alpha1_server_storage_version.py
+test/test_v1alpha1_storage_version.py
+test/test_v1alpha1_storage_version_condition.py
+test/test_v1alpha1_storage_version_list.py
+test/test_v1alpha1_storage_version_status.py
+test/test_v1alpha1_typed_local_object_reference.py
+test/test_v1alpha1_variable.py
+test/test_v1alpha1_workload.py
+test/test_v1alpha1_workload_list.py
+test/test_v1alpha1_workload_spec.py
+test/test_v1alpha2_lease_candidate.py
+test/test_v1alpha2_lease_candidate_list.py
+test/test_v1alpha2_lease_candidate_spec.py
+test/test_v1alpha3_device_taint.py
+test/test_v1alpha3_device_taint_rule.py
+test/test_v1alpha3_device_taint_rule_list.py
+test/test_v1alpha3_device_taint_rule_spec.py
+test/test_v1alpha3_device_taint_rule_status.py
+test/test_v1alpha3_device_taint_selector.py
+test/test_v1beta1_allocated_device_status.py
+test/test_v1beta1_allocation_result.py
+test/test_v1beta1_apply_configuration.py
+test/test_v1beta1_basic_device.py
+test/test_v1beta1_capacity_request_policy.py
+test/test_v1beta1_capacity_request_policy_range.py
+test/test_v1beta1_capacity_requirements.py
+test/test_v1beta1_cel_device_selector.py
+test/test_v1beta1_cluster_trust_bundle.py
+test/test_v1beta1_cluster_trust_bundle_list.py
+test/test_v1beta1_cluster_trust_bundle_spec.py
+test/test_v1beta1_counter.py
+test/test_v1beta1_counter_set.py
+test/test_v1beta1_device.py
+test/test_v1beta1_device_allocation_configuration.py
+test/test_v1beta1_device_allocation_result.py
+test/test_v1beta1_device_attribute.py
+test/test_v1beta1_device_capacity.py
+test/test_v1beta1_device_claim.py
+test/test_v1beta1_device_claim_configuration.py
+test/test_v1beta1_device_class.py
+test/test_v1beta1_device_class_configuration.py
+test/test_v1beta1_device_class_list.py
+test/test_v1beta1_device_class_spec.py
+test/test_v1beta1_device_constraint.py
+test/test_v1beta1_device_counter_consumption.py
+test/test_v1beta1_device_request.py
+test/test_v1beta1_device_request_allocation_result.py
+test/test_v1beta1_device_selector.py
+test/test_v1beta1_device_sub_request.py
+test/test_v1beta1_device_taint.py
+test/test_v1beta1_device_toleration.py
+test/test_v1beta1_ip_address.py
+test/test_v1beta1_ip_address_list.py
+test/test_v1beta1_ip_address_spec.py
+test/test_v1beta1_json_patch.py
+test/test_v1beta1_lease_candidate.py
+test/test_v1beta1_lease_candidate_list.py
+test/test_v1beta1_lease_candidate_spec.py
+test/test_v1beta1_match_condition.py
+test/test_v1beta1_match_resources.py
+test/test_v1beta1_mutating_admission_policy.py
+test/test_v1beta1_mutating_admission_policy_binding.py
+test/test_v1beta1_mutating_admission_policy_binding_list.py
+test/test_v1beta1_mutating_admission_policy_binding_spec.py
+test/test_v1beta1_mutating_admission_policy_list.py
+test/test_v1beta1_mutating_admission_policy_spec.py
+test/test_v1beta1_mutation.py
+test/test_v1beta1_named_rule_with_operations.py
+test/test_v1beta1_network_device_data.py
+test/test_v1beta1_opaque_device_configuration.py
+test/test_v1beta1_param_kind.py
+test/test_v1beta1_param_ref.py
+test/test_v1beta1_parent_reference.py
+test/test_v1beta1_pod_certificate_request.py
+test/test_v1beta1_pod_certificate_request_list.py
+test/test_v1beta1_pod_certificate_request_spec.py
+test/test_v1beta1_pod_certificate_request_status.py
+test/test_v1beta1_resource_claim.py
+test/test_v1beta1_resource_claim_consumer_reference.py
+test/test_v1beta1_resource_claim_list.py
+test/test_v1beta1_resource_claim_spec.py
+test/test_v1beta1_resource_claim_status.py
+test/test_v1beta1_resource_claim_template.py
+test/test_v1beta1_resource_claim_template_list.py
+test/test_v1beta1_resource_claim_template_spec.py
+test/test_v1beta1_resource_pool.py
+test/test_v1beta1_resource_slice.py
+test/test_v1beta1_resource_slice_list.py
+test/test_v1beta1_resource_slice_spec.py
+test/test_v1beta1_service_cidr.py
+test/test_v1beta1_service_cidr_list.py
+test/test_v1beta1_service_cidr_spec.py
+test/test_v1beta1_service_cidr_status.py
+test/test_v1beta1_storage_version_migration.py
+test/test_v1beta1_storage_version_migration_list.py
+test/test_v1beta1_storage_version_migration_spec.py
+test/test_v1beta1_storage_version_migration_status.py
+test/test_v1beta1_variable.py
+test/test_v1beta1_volume_attributes_class.py
+test/test_v1beta1_volume_attributes_class_list.py
+test/test_v1beta2_allocated_device_status.py
+test/test_v1beta2_allocation_result.py
+test/test_v1beta2_capacity_request_policy.py
+test/test_v1beta2_capacity_request_policy_range.py
+test/test_v1beta2_capacity_requirements.py
+test/test_v1beta2_cel_device_selector.py
+test/test_v1beta2_counter.py
+test/test_v1beta2_counter_set.py
+test/test_v1beta2_device.py
+test/test_v1beta2_device_allocation_configuration.py
+test/test_v1beta2_device_allocation_result.py
+test/test_v1beta2_device_attribute.py
+test/test_v1beta2_device_capacity.py
+test/test_v1beta2_device_claim.py
+test/test_v1beta2_device_claim_configuration.py
+test/test_v1beta2_device_class.py
+test/test_v1beta2_device_class_configuration.py
+test/test_v1beta2_device_class_list.py
+test/test_v1beta2_device_class_spec.py
+test/test_v1beta2_device_constraint.py
+test/test_v1beta2_device_counter_consumption.py
+test/test_v1beta2_device_request.py
+test/test_v1beta2_device_request_allocation_result.py
+test/test_v1beta2_device_selector.py
+test/test_v1beta2_device_sub_request.py
+test/test_v1beta2_device_taint.py
+test/test_v1beta2_device_toleration.py
+test/test_v1beta2_exact_device_request.py
+test/test_v1beta2_network_device_data.py
+test/test_v1beta2_opaque_device_configuration.py
+test/test_v1beta2_resource_claim.py
+test/test_v1beta2_resource_claim_consumer_reference.py
+test/test_v1beta2_resource_claim_list.py
+test/test_v1beta2_resource_claim_spec.py
+test/test_v1beta2_resource_claim_status.py
+test/test_v1beta2_resource_claim_template.py
+test/test_v1beta2_resource_claim_template_list.py
+test/test_v1beta2_resource_claim_template_spec.py
+test/test_v1beta2_resource_pool.py
+test/test_v1beta2_resource_slice.py
+test/test_v1beta2_resource_slice_list.py
+test/test_v1beta2_resource_slice_spec.py
+test/test_v2_api_group_discovery.py
+test/test_v2_api_group_discovery_list.py
+test/test_v2_api_resource_discovery.py
+test/test_v2_api_subresource_discovery.py
+test/test_v2_api_version_discovery.py
+test/test_v2_container_resource_metric_source.py
+test/test_v2_container_resource_metric_status.py
+test/test_v2_cross_version_object_reference.py
+test/test_v2_external_metric_source.py
+test/test_v2_external_metric_status.py
+test/test_v2_horizontal_pod_autoscaler.py
+test/test_v2_horizontal_pod_autoscaler_behavior.py
+test/test_v2_horizontal_pod_autoscaler_condition.py
+test/test_v2_horizontal_pod_autoscaler_list.py
+test/test_v2_horizontal_pod_autoscaler_spec.py
+test/test_v2_horizontal_pod_autoscaler_status.py
+test/test_v2_hpa_scaling_policy.py
+test/test_v2_hpa_scaling_rules.py
+test/test_v2_metric_identifier.py
+test/test_v2_metric_spec.py
+test/test_v2_metric_status.py
+test/test_v2_metric_target.py
+test/test_v2_metric_value_status.py
+test/test_v2_object_metric_source.py
+test/test_v2_object_metric_status.py
+test/test_v2_pods_metric_source.py
+test/test_v2_pods_metric_status.py
+test/test_v2_resource_metric_source.py
+test/test_v2_resource_metric_status.py
+test/test_v2beta1_api_group_discovery.py
+test/test_v2beta1_api_group_discovery_list.py
+test/test_v2beta1_api_resource_discovery.py
+test/test_v2beta1_api_subresource_discovery.py
+test/test_v2beta1_api_version_discovery.py
+test/test_version_api.py
+test/test_version_info.py
+test/test_well_known_api.py
+tox.ini
diff --git a/kubernetes_asyncio/.openapi-generator/VERSION b/kubernetes_asyncio/.openapi-generator/VERSION
new file mode 100644
index 0000000000..cd802a1ec4
--- /dev/null
+++ b/kubernetes_asyncio/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.6.0
\ No newline at end of file
diff --git a/kubernetes_asyncio/.openapi-generator/swagger.json-default.sha256 b/kubernetes_asyncio/.openapi-generator/swagger.json-default.sha256
new file mode 100644
index 0000000000..2fd73dc6da
--- /dev/null
+++ b/kubernetes_asyncio/.openapi-generator/swagger.json-default.sha256
@@ -0,0 +1 @@
+550c55f434bcea9a33b26c3dd2fae687acbf0fc36dc0031bb6858be079ca138b
\ No newline at end of file
diff --git a/kubernetes_asyncio/.travis.yml b/kubernetes_asyncio/.travis.yml
new file mode 100644
index 0000000000..2cc5b084e6
--- /dev/null
+++ b/kubernetes_asyncio/.travis.yml
@@ -0,0 +1,17 @@
+# ref: https://docs.travis-ci.com/user/languages/python
+language: python
+python:
+ - "2.7"
+ - "3.2"
+ - "3.3"
+ - "3.4"
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+# command to install dependencies
+install:
+ - "pip install -r requirements.txt"
+ - "pip install -r test-requirements.txt"
+# command to run tests
+script: pytest --cov=client
diff --git a/kubernetes_asyncio/README.md b/kubernetes_asyncio/README.md
new file mode 100644
index 0000000000..ea0f82cced
--- /dev/null
+++ b/kubernetes_asyncio/README.md
@@ -0,0 +1,1737 @@
+# kubernetes_asyncio.client
+No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: release-1.35
+- Package version: 35.0.0+snapshot
+- Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen
+
+## Requirements.
+
+Python 2.7 and 3.4+
+
+## Installation & Usage
+### pip install
+
+If the python package is hosted on a repository, you can install directly using:
+
+```sh
+pip install git+https://github.com/kubernetes-kubernetes_asyncio.client/python.git
+```
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/kubernetes-kubernetes_asyncio.client/python.git`)
+
+Then import the package:
+```python
+import kubernetes_asyncio.client
+```
+
+### Setuptools
+
+Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
+
+```sh
+python setup.py install --user
+```
+(or `sudo python setup.py install` to install the package for all users)
+
+Then import the package:
+```python
+import kubernetes_asyncio.client
+```
+
+## Getting Started
+
+Please follow the [installation procedure](#installation--usage) and then run the following:
+
+```python
+from __future__ import print_function
+
+import time
+import kubernetes_asyncio.client
+from kubernetes_asyncio.client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = kubernetes_asyncio.client.Configuration(
+ host = "http://localhost"
+)
+
+# The kubernetes_asyncio.client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: BearerToken
+configuration.api_key['BearerToken'] = 'YOUR_API_KEY'
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['BearerToken'] = 'Bearer'
+
+
+# Enter a context with an instance of the API kubernetes_asyncio.client
+async with kubernetes_asyncio.client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = kubernetes_asyncio.client.WellKnownApi(api_client)
+
+ try:
+ api_response = await api_instance.get_service_account_issuer_open_id_configuration()
+ pprint(api_response)
+ except ApiException as e:
+ print("Exception when calling WellKnownApi->get_service_account_issuer_open_id_configuration: %s\n" % e)
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://localhost*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*WellKnownApi* | [**get_service_account_issuer_open_id_configuration**](docs/WellKnownApi.md#get_service_account_issuer_open_id_configuration) | **GET** /.well-known/openid-configuration |
+*AdmissionregistrationApi* | [**get_api_group**](docs/AdmissionregistrationApi.md#get_api_group) | **GET** /apis/admissionregistration.k8s.io/ |
+*AdmissionregistrationV1Api* | [**create_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#create_mutating_webhook_configuration) | **POST** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**create_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#create_validating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies |
+*AdmissionregistrationV1Api* | [**create_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#create_validating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings |
+*AdmissionregistrationV1Api* | [**create_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#create_validating_webhook_configuration) | **POST** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**delete_collection_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#delete_collection_mutating_webhook_configuration) | **DELETE** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**delete_collection_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#delete_collection_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies |
+*AdmissionregistrationV1Api* | [**delete_collection_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#delete_collection_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings |
+*AdmissionregistrationV1Api* | [**delete_collection_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#delete_collection_validating_webhook_configuration) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**delete_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#delete_mutating_webhook_configuration) | **DELETE** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**delete_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#delete_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} |
+*AdmissionregistrationV1Api* | [**delete_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#delete_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1Api* | [**delete_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#delete_validating_webhook_configuration) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**get_api_resources**](docs/AdmissionregistrationV1Api.md#get_api_resources) | **GET** /apis/admissionregistration.k8s.io/v1/ |
+*AdmissionregistrationV1Api* | [**list_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#list_mutating_webhook_configuration) | **GET** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**list_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#list_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies |
+*AdmissionregistrationV1Api* | [**list_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#list_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings |
+*AdmissionregistrationV1Api* | [**list_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#list_validating_webhook_configuration) | **GET** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations |
+*AdmissionregistrationV1Api* | [**patch_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#patch_mutating_webhook_configuration) | **PATCH** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**patch_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#patch_validating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} |
+*AdmissionregistrationV1Api* | [**patch_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#patch_validating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1Api* | [**patch_validating_admission_policy_status**](docs/AdmissionregistrationV1Api.md#patch_validating_admission_policy_status) | **PATCH** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status |
+*AdmissionregistrationV1Api* | [**patch_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#patch_validating_webhook_configuration) | **PATCH** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**read_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#read_mutating_webhook_configuration) | **GET** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**read_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#read_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} |
+*AdmissionregistrationV1Api* | [**read_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#read_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1Api* | [**read_validating_admission_policy_status**](docs/AdmissionregistrationV1Api.md#read_validating_admission_policy_status) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status |
+*AdmissionregistrationV1Api* | [**read_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#read_validating_webhook_configuration) | **GET** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**replace_mutating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#replace_mutating_webhook_configuration) | **PUT** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1Api* | [**replace_validating_admission_policy**](docs/AdmissionregistrationV1Api.md#replace_validating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} |
+*AdmissionregistrationV1Api* | [**replace_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#replace_validating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1Api* | [**replace_validating_admission_policy_status**](docs/AdmissionregistrationV1Api.md#replace_validating_admission_policy_status) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status |
+*AdmissionregistrationV1Api* | [**replace_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#replace_validating_webhook_configuration) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} |
+*AdmissionregistrationV1alpha1Api* | [**create_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#create_mutating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies |
+*AdmissionregistrationV1alpha1Api* | [**create_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#create_mutating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1alpha1Api* | [**delete_collection_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies |
+*AdmissionregistrationV1alpha1Api* | [**delete_collection_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1alpha1Api* | [**delete_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1alpha1Api* | [**delete_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1alpha1Api* | [**get_api_resources**](docs/AdmissionregistrationV1alpha1Api.md#get_api_resources) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ |
+*AdmissionregistrationV1alpha1Api* | [**list_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#list_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies |
+*AdmissionregistrationV1alpha1Api* | [**list_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#list_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1alpha1Api* | [**patch_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#patch_mutating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1alpha1Api* | [**patch_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#patch_mutating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1alpha1Api* | [**read_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#read_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1alpha1Api* | [**read_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#read_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1alpha1Api* | [**replace_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#replace_mutating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1alpha1Api* | [**replace_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#replace_mutating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1beta1Api* | [**create_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#create_mutating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies |
+*AdmissionregistrationV1beta1Api* | [**create_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#create_mutating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1beta1Api* | [**delete_collection_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies |
+*AdmissionregistrationV1beta1Api* | [**delete_collection_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1beta1Api* | [**delete_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1beta1Api* | [**delete_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1beta1Api* | [**get_api_resources**](docs/AdmissionregistrationV1beta1Api.md#get_api_resources) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ |
+*AdmissionregistrationV1beta1Api* | [**list_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#list_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies |
+*AdmissionregistrationV1beta1Api* | [**list_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#list_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings |
+*AdmissionregistrationV1beta1Api* | [**patch_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#patch_mutating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1beta1Api* | [**patch_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#patch_mutating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1beta1Api* | [**read_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#read_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1beta1Api* | [**read_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#read_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} |
+*AdmissionregistrationV1beta1Api* | [**replace_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#replace_mutating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} |
+*AdmissionregistrationV1beta1Api* | [**replace_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#replace_mutating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} |
+*ApiextensionsApi* | [**get_api_group**](docs/ApiextensionsApi.md#get_api_group) | **GET** /apis/apiextensions.k8s.io/ |
+*ApiextensionsV1Api* | [**create_custom_resource_definition**](docs/ApiextensionsV1Api.md#create_custom_resource_definition) | **POST** /apis/apiextensions.k8s.io/v1/customresourcedefinitions |
+*ApiextensionsV1Api* | [**delete_collection_custom_resource_definition**](docs/ApiextensionsV1Api.md#delete_collection_custom_resource_definition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions |
+*ApiextensionsV1Api* | [**delete_custom_resource_definition**](docs/ApiextensionsV1Api.md#delete_custom_resource_definition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} |
+*ApiextensionsV1Api* | [**get_api_resources**](docs/ApiextensionsV1Api.md#get_api_resources) | **GET** /apis/apiextensions.k8s.io/v1/ |
+*ApiextensionsV1Api* | [**list_custom_resource_definition**](docs/ApiextensionsV1Api.md#list_custom_resource_definition) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions |
+*ApiextensionsV1Api* | [**patch_custom_resource_definition**](docs/ApiextensionsV1Api.md#patch_custom_resource_definition) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} |
+*ApiextensionsV1Api* | [**patch_custom_resource_definition_status**](docs/ApiextensionsV1Api.md#patch_custom_resource_definition_status) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status |
+*ApiextensionsV1Api* | [**read_custom_resource_definition**](docs/ApiextensionsV1Api.md#read_custom_resource_definition) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} |
+*ApiextensionsV1Api* | [**read_custom_resource_definition_status**](docs/ApiextensionsV1Api.md#read_custom_resource_definition_status) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status |
+*ApiextensionsV1Api* | [**replace_custom_resource_definition**](docs/ApiextensionsV1Api.md#replace_custom_resource_definition) | **PUT** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} |
+*ApiextensionsV1Api* | [**replace_custom_resource_definition_status**](docs/ApiextensionsV1Api.md#replace_custom_resource_definition_status) | **PUT** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status |
+*ApiregistrationApi* | [**get_api_group**](docs/ApiregistrationApi.md#get_api_group) | **GET** /apis/apiregistration.k8s.io/ |
+*ApiregistrationV1Api* | [**create_api_service**](docs/ApiregistrationV1Api.md#create_api_service) | **POST** /apis/apiregistration.k8s.io/v1/apiservices |
+*ApiregistrationV1Api* | [**delete_api_service**](docs/ApiregistrationV1Api.md#delete_api_service) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices/{name} |
+*ApiregistrationV1Api* | [**delete_collection_api_service**](docs/ApiregistrationV1Api.md#delete_collection_api_service) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices |
+*ApiregistrationV1Api* | [**get_api_resources**](docs/ApiregistrationV1Api.md#get_api_resources) | **GET** /apis/apiregistration.k8s.io/v1/ |
+*ApiregistrationV1Api* | [**list_api_service**](docs/ApiregistrationV1Api.md#list_api_service) | **GET** /apis/apiregistration.k8s.io/v1/apiservices |
+*ApiregistrationV1Api* | [**patch_api_service**](docs/ApiregistrationV1Api.md#patch_api_service) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name} |
+*ApiregistrationV1Api* | [**patch_api_service_status**](docs/ApiregistrationV1Api.md#patch_api_service_status) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status |
+*ApiregistrationV1Api* | [**read_api_service**](docs/ApiregistrationV1Api.md#read_api_service) | **GET** /apis/apiregistration.k8s.io/v1/apiservices/{name} |
+*ApiregistrationV1Api* | [**read_api_service_status**](docs/ApiregistrationV1Api.md#read_api_service_status) | **GET** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status |
+*ApiregistrationV1Api* | [**replace_api_service**](docs/ApiregistrationV1Api.md#replace_api_service) | **PUT** /apis/apiregistration.k8s.io/v1/apiservices/{name} |
+*ApiregistrationV1Api* | [**replace_api_service_status**](docs/ApiregistrationV1Api.md#replace_api_service_status) | **PUT** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status |
+*ApisApi* | [**get_api_versions**](docs/ApisApi.md#get_api_versions) | **GET** /apis/ |
+*AppsApi* | [**get_api_group**](docs/AppsApi.md#get_api_group) | **GET** /apis/apps/ |
+*AppsV1Api* | [**create_namespaced_controller_revision**](docs/AppsV1Api.md#create_namespaced_controller_revision) | **POST** /apis/apps/v1/namespaces/{namespace}/controllerrevisions |
+*AppsV1Api* | [**create_namespaced_daemon_set**](docs/AppsV1Api.md#create_namespaced_daemon_set) | **POST** /apis/apps/v1/namespaces/{namespace}/daemonsets |
+*AppsV1Api* | [**create_namespaced_deployment**](docs/AppsV1Api.md#create_namespaced_deployment) | **POST** /apis/apps/v1/namespaces/{namespace}/deployments |
+*AppsV1Api* | [**create_namespaced_replica_set**](docs/AppsV1Api.md#create_namespaced_replica_set) | **POST** /apis/apps/v1/namespaces/{namespace}/replicasets |
+*AppsV1Api* | [**create_namespaced_stateful_set**](docs/AppsV1Api.md#create_namespaced_stateful_set) | **POST** /apis/apps/v1/namespaces/{namespace}/statefulsets |
+*AppsV1Api* | [**delete_collection_namespaced_controller_revision**](docs/AppsV1Api.md#delete_collection_namespaced_controller_revision) | **DELETE** /apis/apps/v1/namespaces/{namespace}/controllerrevisions |
+*AppsV1Api* | [**delete_collection_namespaced_daemon_set**](docs/AppsV1Api.md#delete_collection_namespaced_daemon_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/daemonsets |
+*AppsV1Api* | [**delete_collection_namespaced_deployment**](docs/AppsV1Api.md#delete_collection_namespaced_deployment) | **DELETE** /apis/apps/v1/namespaces/{namespace}/deployments |
+*AppsV1Api* | [**delete_collection_namespaced_replica_set**](docs/AppsV1Api.md#delete_collection_namespaced_replica_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/replicasets |
+*AppsV1Api* | [**delete_collection_namespaced_stateful_set**](docs/AppsV1Api.md#delete_collection_namespaced_stateful_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/statefulsets |
+*AppsV1Api* | [**delete_namespaced_controller_revision**](docs/AppsV1Api.md#delete_namespaced_controller_revision) | **DELETE** /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} |
+*AppsV1Api* | [**delete_namespaced_daemon_set**](docs/AppsV1Api.md#delete_namespaced_daemon_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name} |
+*AppsV1Api* | [**delete_namespaced_deployment**](docs/AppsV1Api.md#delete_namespaced_deployment) | **DELETE** /apis/apps/v1/namespaces/{namespace}/deployments/{name} |
+*AppsV1Api* | [**delete_namespaced_replica_set**](docs/AppsV1Api.md#delete_namespaced_replica_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} |
+*AppsV1Api* | [**delete_namespaced_stateful_set**](docs/AppsV1Api.md#delete_namespaced_stateful_set) | **DELETE** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} |
+*AppsV1Api* | [**get_api_resources**](docs/AppsV1Api.md#get_api_resources) | **GET** /apis/apps/v1/ |
+*AppsV1Api* | [**list_controller_revision_for_all_namespaces**](docs/AppsV1Api.md#list_controller_revision_for_all_namespaces) | **GET** /apis/apps/v1/controllerrevisions |
+*AppsV1Api* | [**list_daemon_set_for_all_namespaces**](docs/AppsV1Api.md#list_daemon_set_for_all_namespaces) | **GET** /apis/apps/v1/daemonsets |
+*AppsV1Api* | [**list_deployment_for_all_namespaces**](docs/AppsV1Api.md#list_deployment_for_all_namespaces) | **GET** /apis/apps/v1/deployments |
+*AppsV1Api* | [**list_namespaced_controller_revision**](docs/AppsV1Api.md#list_namespaced_controller_revision) | **GET** /apis/apps/v1/namespaces/{namespace}/controllerrevisions |
+*AppsV1Api* | [**list_namespaced_daemon_set**](docs/AppsV1Api.md#list_namespaced_daemon_set) | **GET** /apis/apps/v1/namespaces/{namespace}/daemonsets |
+*AppsV1Api* | [**list_namespaced_deployment**](docs/AppsV1Api.md#list_namespaced_deployment) | **GET** /apis/apps/v1/namespaces/{namespace}/deployments |
+*AppsV1Api* | [**list_namespaced_replica_set**](docs/AppsV1Api.md#list_namespaced_replica_set) | **GET** /apis/apps/v1/namespaces/{namespace}/replicasets |
+*AppsV1Api* | [**list_namespaced_stateful_set**](docs/AppsV1Api.md#list_namespaced_stateful_set) | **GET** /apis/apps/v1/namespaces/{namespace}/statefulsets |
+*AppsV1Api* | [**list_replica_set_for_all_namespaces**](docs/AppsV1Api.md#list_replica_set_for_all_namespaces) | **GET** /apis/apps/v1/replicasets |
+*AppsV1Api* | [**list_stateful_set_for_all_namespaces**](docs/AppsV1Api.md#list_stateful_set_for_all_namespaces) | **GET** /apis/apps/v1/statefulsets |
+*AppsV1Api* | [**patch_namespaced_controller_revision**](docs/AppsV1Api.md#patch_namespaced_controller_revision) | **PATCH** /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} |
+*AppsV1Api* | [**patch_namespaced_daemon_set**](docs/AppsV1Api.md#patch_namespaced_daemon_set) | **PATCH** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name} |
+*AppsV1Api* | [**patch_namespaced_daemon_set_status**](docs/AppsV1Api.md#patch_namespaced_daemon_set_status) | **PATCH** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status |
+*AppsV1Api* | [**patch_namespaced_deployment**](docs/AppsV1Api.md#patch_namespaced_deployment) | **PATCH** /apis/apps/v1/namespaces/{namespace}/deployments/{name} |
+*AppsV1Api* | [**patch_namespaced_deployment_scale**](docs/AppsV1Api.md#patch_namespaced_deployment_scale) | **PATCH** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale |
+*AppsV1Api* | [**patch_namespaced_deployment_status**](docs/AppsV1Api.md#patch_namespaced_deployment_status) | **PATCH** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status |
+*AppsV1Api* | [**patch_namespaced_replica_set**](docs/AppsV1Api.md#patch_namespaced_replica_set) | **PATCH** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} |
+*AppsV1Api* | [**patch_namespaced_replica_set_scale**](docs/AppsV1Api.md#patch_namespaced_replica_set_scale) | **PATCH** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale |
+*AppsV1Api* | [**patch_namespaced_replica_set_status**](docs/AppsV1Api.md#patch_namespaced_replica_set_status) | **PATCH** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status |
+*AppsV1Api* | [**patch_namespaced_stateful_set**](docs/AppsV1Api.md#patch_namespaced_stateful_set) | **PATCH** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} |
+*AppsV1Api* | [**patch_namespaced_stateful_set_scale**](docs/AppsV1Api.md#patch_namespaced_stateful_set_scale) | **PATCH** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale |
+*AppsV1Api* | [**patch_namespaced_stateful_set_status**](docs/AppsV1Api.md#patch_namespaced_stateful_set_status) | **PATCH** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status |
+*AppsV1Api* | [**read_namespaced_controller_revision**](docs/AppsV1Api.md#read_namespaced_controller_revision) | **GET** /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} |
+*AppsV1Api* | [**read_namespaced_daemon_set**](docs/AppsV1Api.md#read_namespaced_daemon_set) | **GET** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name} |
+*AppsV1Api* | [**read_namespaced_daemon_set_status**](docs/AppsV1Api.md#read_namespaced_daemon_set_status) | **GET** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status |
+*AppsV1Api* | [**read_namespaced_deployment**](docs/AppsV1Api.md#read_namespaced_deployment) | **GET** /apis/apps/v1/namespaces/{namespace}/deployments/{name} |
+*AppsV1Api* | [**read_namespaced_deployment_scale**](docs/AppsV1Api.md#read_namespaced_deployment_scale) | **GET** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale |
+*AppsV1Api* | [**read_namespaced_deployment_status**](docs/AppsV1Api.md#read_namespaced_deployment_status) | **GET** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status |
+*AppsV1Api* | [**read_namespaced_replica_set**](docs/AppsV1Api.md#read_namespaced_replica_set) | **GET** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} |
+*AppsV1Api* | [**read_namespaced_replica_set_scale**](docs/AppsV1Api.md#read_namespaced_replica_set_scale) | **GET** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale |
+*AppsV1Api* | [**read_namespaced_replica_set_status**](docs/AppsV1Api.md#read_namespaced_replica_set_status) | **GET** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status |
+*AppsV1Api* | [**read_namespaced_stateful_set**](docs/AppsV1Api.md#read_namespaced_stateful_set) | **GET** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} |
+*AppsV1Api* | [**read_namespaced_stateful_set_scale**](docs/AppsV1Api.md#read_namespaced_stateful_set_scale) | **GET** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale |
+*AppsV1Api* | [**read_namespaced_stateful_set_status**](docs/AppsV1Api.md#read_namespaced_stateful_set_status) | **GET** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status |
+*AppsV1Api* | [**replace_namespaced_controller_revision**](docs/AppsV1Api.md#replace_namespaced_controller_revision) | **PUT** /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} |
+*AppsV1Api* | [**replace_namespaced_daemon_set**](docs/AppsV1Api.md#replace_namespaced_daemon_set) | **PUT** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name} |
+*AppsV1Api* | [**replace_namespaced_daemon_set_status**](docs/AppsV1Api.md#replace_namespaced_daemon_set_status) | **PUT** /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status |
+*AppsV1Api* | [**replace_namespaced_deployment**](docs/AppsV1Api.md#replace_namespaced_deployment) | **PUT** /apis/apps/v1/namespaces/{namespace}/deployments/{name} |
+*AppsV1Api* | [**replace_namespaced_deployment_scale**](docs/AppsV1Api.md#replace_namespaced_deployment_scale) | **PUT** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale |
+*AppsV1Api* | [**replace_namespaced_deployment_status**](docs/AppsV1Api.md#replace_namespaced_deployment_status) | **PUT** /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status |
+*AppsV1Api* | [**replace_namespaced_replica_set**](docs/AppsV1Api.md#replace_namespaced_replica_set) | **PUT** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} |
+*AppsV1Api* | [**replace_namespaced_replica_set_scale**](docs/AppsV1Api.md#replace_namespaced_replica_set_scale) | **PUT** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale |
+*AppsV1Api* | [**replace_namespaced_replica_set_status**](docs/AppsV1Api.md#replace_namespaced_replica_set_status) | **PUT** /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status |
+*AppsV1Api* | [**replace_namespaced_stateful_set**](docs/AppsV1Api.md#replace_namespaced_stateful_set) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} |
+*AppsV1Api* | [**replace_namespaced_stateful_set_scale**](docs/AppsV1Api.md#replace_namespaced_stateful_set_scale) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale |
+*AppsV1Api* | [**replace_namespaced_stateful_set_status**](docs/AppsV1Api.md#replace_namespaced_stateful_set_status) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status |
+*AuthenticationApi* | [**get_api_group**](docs/AuthenticationApi.md#get_api_group) | **GET** /apis/authentication.k8s.io/ |
+*AuthenticationV1Api* | [**create_self_subject_review**](docs/AuthenticationV1Api.md#create_self_subject_review) | **POST** /apis/authentication.k8s.io/v1/selfsubjectreviews |
+*AuthenticationV1Api* | [**create_token_review**](docs/AuthenticationV1Api.md#create_token_review) | **POST** /apis/authentication.k8s.io/v1/tokenreviews |
+*AuthenticationV1Api* | [**get_api_resources**](docs/AuthenticationV1Api.md#get_api_resources) | **GET** /apis/authentication.k8s.io/v1/ |
+*AuthorizationApi* | [**get_api_group**](docs/AuthorizationApi.md#get_api_group) | **GET** /apis/authorization.k8s.io/ |
+*AuthorizationV1Api* | [**create_namespaced_local_subject_access_review**](docs/AuthorizationV1Api.md#create_namespaced_local_subject_access_review) | **POST** /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews |
+*AuthorizationV1Api* | [**create_self_subject_access_review**](docs/AuthorizationV1Api.md#create_self_subject_access_review) | **POST** /apis/authorization.k8s.io/v1/selfsubjectaccessreviews |
+*AuthorizationV1Api* | [**create_self_subject_rules_review**](docs/AuthorizationV1Api.md#create_self_subject_rules_review) | **POST** /apis/authorization.k8s.io/v1/selfsubjectrulesreviews |
+*AuthorizationV1Api* | [**create_subject_access_review**](docs/AuthorizationV1Api.md#create_subject_access_review) | **POST** /apis/authorization.k8s.io/v1/subjectaccessreviews |
+*AuthorizationV1Api* | [**get_api_resources**](docs/AuthorizationV1Api.md#get_api_resources) | **GET** /apis/authorization.k8s.io/v1/ |
+*AutoscalingApi* | [**get_api_group**](docs/AutoscalingApi.md#get_api_group) | **GET** /apis/autoscaling/ |
+*AutoscalingV1Api* | [**create_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#create_namespaced_horizontal_pod_autoscaler) | **POST** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV1Api* | [**delete_collection_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#delete_collection_namespaced_horizontal_pod_autoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV1Api* | [**delete_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#delete_namespaced_horizontal_pod_autoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV1Api* | [**get_api_resources**](docs/AutoscalingV1Api.md#get_api_resources) | **GET** /apis/autoscaling/v1/ |
+*AutoscalingV1Api* | [**list_horizontal_pod_autoscaler_for_all_namespaces**](docs/AutoscalingV1Api.md#list_horizontal_pod_autoscaler_for_all_namespaces) | **GET** /apis/autoscaling/v1/horizontalpodautoscalers |
+*AutoscalingV1Api* | [**list_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#list_namespaced_horizontal_pod_autoscaler) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV1Api* | [**patch_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#patch_namespaced_horizontal_pod_autoscaler) | **PATCH** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV1Api* | [**patch_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV1Api.md#patch_namespaced_horizontal_pod_autoscaler_status) | **PATCH** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*AutoscalingV1Api* | [**read_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#read_namespaced_horizontal_pod_autoscaler) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV1Api* | [**read_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV1Api.md#read_namespaced_horizontal_pod_autoscaler_status) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*AutoscalingV1Api* | [**replace_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV1Api.md#replace_namespaced_horizontal_pod_autoscaler) | **PUT** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV1Api* | [**replace_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV1Api.md#replace_namespaced_horizontal_pod_autoscaler_status) | **PUT** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*AutoscalingV2Api* | [**create_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#create_namespaced_horizontal_pod_autoscaler) | **POST** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV2Api* | [**delete_collection_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#delete_collection_namespaced_horizontal_pod_autoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV2Api* | [**delete_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#delete_namespaced_horizontal_pod_autoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV2Api* | [**get_api_resources**](docs/AutoscalingV2Api.md#get_api_resources) | **GET** /apis/autoscaling/v2/ |
+*AutoscalingV2Api* | [**list_horizontal_pod_autoscaler_for_all_namespaces**](docs/AutoscalingV2Api.md#list_horizontal_pod_autoscaler_for_all_namespaces) | **GET** /apis/autoscaling/v2/horizontalpodautoscalers |
+*AutoscalingV2Api* | [**list_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#list_namespaced_horizontal_pod_autoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers |
+*AutoscalingV2Api* | [**patch_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#patch_namespaced_horizontal_pod_autoscaler) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV2Api* | [**patch_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV2Api.md#patch_namespaced_horizontal_pod_autoscaler_status) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*AutoscalingV2Api* | [**read_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#read_namespaced_horizontal_pod_autoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV2Api* | [**read_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV2Api.md#read_namespaced_horizontal_pod_autoscaler_status) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*AutoscalingV2Api* | [**replace_namespaced_horizontal_pod_autoscaler**](docs/AutoscalingV2Api.md#replace_namespaced_horizontal_pod_autoscaler) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} |
+*AutoscalingV2Api* | [**replace_namespaced_horizontal_pod_autoscaler_status**](docs/AutoscalingV2Api.md#replace_namespaced_horizontal_pod_autoscaler_status) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status |
+*BatchApi* | [**get_api_group**](docs/BatchApi.md#get_api_group) | **GET** /apis/batch/ |
+*BatchV1Api* | [**create_namespaced_cron_job**](docs/BatchV1Api.md#create_namespaced_cron_job) | **POST** /apis/batch/v1/namespaces/{namespace}/cronjobs |
+*BatchV1Api* | [**create_namespaced_job**](docs/BatchV1Api.md#create_namespaced_job) | **POST** /apis/batch/v1/namespaces/{namespace}/jobs |
+*BatchV1Api* | [**delete_collection_namespaced_cron_job**](docs/BatchV1Api.md#delete_collection_namespaced_cron_job) | **DELETE** /apis/batch/v1/namespaces/{namespace}/cronjobs |
+*BatchV1Api* | [**delete_collection_namespaced_job**](docs/BatchV1Api.md#delete_collection_namespaced_job) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs |
+*BatchV1Api* | [**delete_namespaced_cron_job**](docs/BatchV1Api.md#delete_namespaced_cron_job) | **DELETE** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} |
+*BatchV1Api* | [**delete_namespaced_job**](docs/BatchV1Api.md#delete_namespaced_job) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs/{name} |
+*BatchV1Api* | [**get_api_resources**](docs/BatchV1Api.md#get_api_resources) | **GET** /apis/batch/v1/ |
+*BatchV1Api* | [**list_cron_job_for_all_namespaces**](docs/BatchV1Api.md#list_cron_job_for_all_namespaces) | **GET** /apis/batch/v1/cronjobs |
+*BatchV1Api* | [**list_job_for_all_namespaces**](docs/BatchV1Api.md#list_job_for_all_namespaces) | **GET** /apis/batch/v1/jobs |
+*BatchV1Api* | [**list_namespaced_cron_job**](docs/BatchV1Api.md#list_namespaced_cron_job) | **GET** /apis/batch/v1/namespaces/{namespace}/cronjobs |
+*BatchV1Api* | [**list_namespaced_job**](docs/BatchV1Api.md#list_namespaced_job) | **GET** /apis/batch/v1/namespaces/{namespace}/jobs |
+*BatchV1Api* | [**patch_namespaced_cron_job**](docs/BatchV1Api.md#patch_namespaced_cron_job) | **PATCH** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} |
+*BatchV1Api* | [**patch_namespaced_cron_job_status**](docs/BatchV1Api.md#patch_namespaced_cron_job_status) | **PATCH** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status |
+*BatchV1Api* | [**patch_namespaced_job**](docs/BatchV1Api.md#patch_namespaced_job) | **PATCH** /apis/batch/v1/namespaces/{namespace}/jobs/{name} |
+*BatchV1Api* | [**patch_namespaced_job_status**](docs/BatchV1Api.md#patch_namespaced_job_status) | **PATCH** /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status |
+*BatchV1Api* | [**read_namespaced_cron_job**](docs/BatchV1Api.md#read_namespaced_cron_job) | **GET** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} |
+*BatchV1Api* | [**read_namespaced_cron_job_status**](docs/BatchV1Api.md#read_namespaced_cron_job_status) | **GET** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status |
+*BatchV1Api* | [**read_namespaced_job**](docs/BatchV1Api.md#read_namespaced_job) | **GET** /apis/batch/v1/namespaces/{namespace}/jobs/{name} |
+*BatchV1Api* | [**read_namespaced_job_status**](docs/BatchV1Api.md#read_namespaced_job_status) | **GET** /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status |
+*BatchV1Api* | [**replace_namespaced_cron_job**](docs/BatchV1Api.md#replace_namespaced_cron_job) | **PUT** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} |
+*BatchV1Api* | [**replace_namespaced_cron_job_status**](docs/BatchV1Api.md#replace_namespaced_cron_job_status) | **PUT** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status |
+*BatchV1Api* | [**replace_namespaced_job**](docs/BatchV1Api.md#replace_namespaced_job) | **PUT** /apis/batch/v1/namespaces/{namespace}/jobs/{name} |
+*BatchV1Api* | [**replace_namespaced_job_status**](docs/BatchV1Api.md#replace_namespaced_job_status) | **PUT** /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status |
+*CertificatesApi* | [**get_api_group**](docs/CertificatesApi.md#get_api_group) | **GET** /apis/certificates.k8s.io/ |
+*CertificatesV1Api* | [**create_certificate_signing_request**](docs/CertificatesV1Api.md#create_certificate_signing_request) | **POST** /apis/certificates.k8s.io/v1/certificatesigningrequests |
+*CertificatesV1Api* | [**delete_certificate_signing_request**](docs/CertificatesV1Api.md#delete_certificate_signing_request) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} |
+*CertificatesV1Api* | [**delete_collection_certificate_signing_request**](docs/CertificatesV1Api.md#delete_collection_certificate_signing_request) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests |
+*CertificatesV1Api* | [**get_api_resources**](docs/CertificatesV1Api.md#get_api_resources) | **GET** /apis/certificates.k8s.io/v1/ |
+*CertificatesV1Api* | [**list_certificate_signing_request**](docs/CertificatesV1Api.md#list_certificate_signing_request) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests |
+*CertificatesV1Api* | [**patch_certificate_signing_request**](docs/CertificatesV1Api.md#patch_certificate_signing_request) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} |
+*CertificatesV1Api* | [**patch_certificate_signing_request_approval**](docs/CertificatesV1Api.md#patch_certificate_signing_request_approval) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval |
+*CertificatesV1Api* | [**patch_certificate_signing_request_status**](docs/CertificatesV1Api.md#patch_certificate_signing_request_status) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status |
+*CertificatesV1Api* | [**read_certificate_signing_request**](docs/CertificatesV1Api.md#read_certificate_signing_request) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} |
+*CertificatesV1Api* | [**read_certificate_signing_request_approval**](docs/CertificatesV1Api.md#read_certificate_signing_request_approval) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval |
+*CertificatesV1Api* | [**read_certificate_signing_request_status**](docs/CertificatesV1Api.md#read_certificate_signing_request_status) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status |
+*CertificatesV1Api* | [**replace_certificate_signing_request**](docs/CertificatesV1Api.md#replace_certificate_signing_request) | **PUT** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} |
+*CertificatesV1Api* | [**replace_certificate_signing_request_approval**](docs/CertificatesV1Api.md#replace_certificate_signing_request_approval) | **PUT** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval |
+*CertificatesV1Api* | [**replace_certificate_signing_request_status**](docs/CertificatesV1Api.md#replace_certificate_signing_request_status) | **PUT** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status |
+*CertificatesV1alpha1Api* | [**create_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#create_cluster_trust_bundle) | **POST** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles |
+*CertificatesV1alpha1Api* | [**delete_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#delete_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} |
+*CertificatesV1alpha1Api* | [**delete_collection_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#delete_collection_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles |
+*CertificatesV1alpha1Api* | [**get_api_resources**](docs/CertificatesV1alpha1Api.md#get_api_resources) | **GET** /apis/certificates.k8s.io/v1alpha1/ |
+*CertificatesV1alpha1Api* | [**list_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#list_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles |
+*CertificatesV1alpha1Api* | [**patch_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#patch_cluster_trust_bundle) | **PATCH** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} |
+*CertificatesV1alpha1Api* | [**read_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#read_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} |
+*CertificatesV1alpha1Api* | [**replace_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#replace_cluster_trust_bundle) | **PUT** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} |
+*CertificatesV1beta1Api* | [**create_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#create_cluster_trust_bundle) | **POST** /apis/certificates.k8s.io/v1beta1/clustertrustbundles |
+*CertificatesV1beta1Api* | [**create_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#create_namespaced_pod_certificate_request) | **POST** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests |
+*CertificatesV1beta1Api* | [**delete_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#delete_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} |
+*CertificatesV1beta1Api* | [**delete_collection_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#delete_collection_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1beta1/clustertrustbundles |
+*CertificatesV1beta1Api* | [**delete_collection_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#delete_collection_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests |
+*CertificatesV1beta1Api* | [**delete_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#delete_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} |
+*CertificatesV1beta1Api* | [**get_api_resources**](docs/CertificatesV1beta1Api.md#get_api_resources) | **GET** /apis/certificates.k8s.io/v1beta1/ |
+*CertificatesV1beta1Api* | [**list_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#list_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1beta1/clustertrustbundles |
+*CertificatesV1beta1Api* | [**list_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#list_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests |
+*CertificatesV1beta1Api* | [**list_pod_certificate_request_for_all_namespaces**](docs/CertificatesV1beta1Api.md#list_pod_certificate_request_for_all_namespaces) | **GET** /apis/certificates.k8s.io/v1beta1/podcertificaterequests |
+*CertificatesV1beta1Api* | [**patch_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#patch_cluster_trust_bundle) | **PATCH** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} |
+*CertificatesV1beta1Api* | [**patch_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#patch_namespaced_pod_certificate_request) | **PATCH** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} |
+*CertificatesV1beta1Api* | [**patch_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#patch_namespaced_pod_certificate_request_status) | **PATCH** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status |
+*CertificatesV1beta1Api* | [**read_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#read_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} |
+*CertificatesV1beta1Api* | [**read_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#read_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} |
+*CertificatesV1beta1Api* | [**read_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#read_namespaced_pod_certificate_request_status) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status |
+*CertificatesV1beta1Api* | [**replace_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#replace_cluster_trust_bundle) | **PUT** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} |
+*CertificatesV1beta1Api* | [**replace_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#replace_namespaced_pod_certificate_request) | **PUT** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} |
+*CertificatesV1beta1Api* | [**replace_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#replace_namespaced_pod_certificate_request_status) | **PUT** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status |
+*CoordinationApi* | [**get_api_group**](docs/CoordinationApi.md#get_api_group) | **GET** /apis/coordination.k8s.io/ |
+*CoordinationV1Api* | [**create_namespaced_lease**](docs/CoordinationV1Api.md#create_namespaced_lease) | **POST** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases |
+*CoordinationV1Api* | [**delete_collection_namespaced_lease**](docs/CoordinationV1Api.md#delete_collection_namespaced_lease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases |
+*CoordinationV1Api* | [**delete_namespaced_lease**](docs/CoordinationV1Api.md#delete_namespaced_lease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} |
+*CoordinationV1Api* | [**get_api_resources**](docs/CoordinationV1Api.md#get_api_resources) | **GET** /apis/coordination.k8s.io/v1/ |
+*CoordinationV1Api* | [**list_lease_for_all_namespaces**](docs/CoordinationV1Api.md#list_lease_for_all_namespaces) | **GET** /apis/coordination.k8s.io/v1/leases |
+*CoordinationV1Api* | [**list_namespaced_lease**](docs/CoordinationV1Api.md#list_namespaced_lease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases |
+*CoordinationV1Api* | [**patch_namespaced_lease**](docs/CoordinationV1Api.md#patch_namespaced_lease) | **PATCH** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} |
+*CoordinationV1Api* | [**read_namespaced_lease**](docs/CoordinationV1Api.md#read_namespaced_lease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} |
+*CoordinationV1Api* | [**replace_namespaced_lease**](docs/CoordinationV1Api.md#replace_namespaced_lease) | **PUT** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} |
+*CoordinationV1alpha2Api* | [**create_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#create_namespaced_lease_candidate) | **POST** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates |
+*CoordinationV1alpha2Api* | [**delete_collection_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#delete_collection_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates |
+*CoordinationV1alpha2Api* | [**delete_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#delete_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1alpha2Api* | [**get_api_resources**](docs/CoordinationV1alpha2Api.md#get_api_resources) | **GET** /apis/coordination.k8s.io/v1alpha2/ |
+*CoordinationV1alpha2Api* | [**list_lease_candidate_for_all_namespaces**](docs/CoordinationV1alpha2Api.md#list_lease_candidate_for_all_namespaces) | **GET** /apis/coordination.k8s.io/v1alpha2/leasecandidates |
+*CoordinationV1alpha2Api* | [**list_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#list_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates |
+*CoordinationV1alpha2Api* | [**patch_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#patch_namespaced_lease_candidate) | **PATCH** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1alpha2Api* | [**read_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#read_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1alpha2Api* | [**replace_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#replace_namespaced_lease_candidate) | **PUT** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1beta1Api* | [**create_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#create_namespaced_lease_candidate) | **POST** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates |
+*CoordinationV1beta1Api* | [**delete_collection_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#delete_collection_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates |
+*CoordinationV1beta1Api* | [**delete_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#delete_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1beta1Api* | [**get_api_resources**](docs/CoordinationV1beta1Api.md#get_api_resources) | **GET** /apis/coordination.k8s.io/v1beta1/ |
+*CoordinationV1beta1Api* | [**list_lease_candidate_for_all_namespaces**](docs/CoordinationV1beta1Api.md#list_lease_candidate_for_all_namespaces) | **GET** /apis/coordination.k8s.io/v1beta1/leasecandidates |
+*CoordinationV1beta1Api* | [**list_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#list_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates |
+*CoordinationV1beta1Api* | [**patch_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#patch_namespaced_lease_candidate) | **PATCH** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1beta1Api* | [**read_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#read_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} |
+*CoordinationV1beta1Api* | [**replace_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#replace_namespaced_lease_candidate) | **PUT** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} |
+*CoreApi* | [**get_api_versions**](docs/CoreApi.md#get_api_versions) | **GET** /api/ |
+*CoreV1Api* | [**connect_delete_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_delete_namespaced_pod_proxy) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_delete_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_delete_namespaced_pod_proxy_with_path) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_delete_namespaced_service_proxy**](docs/CoreV1Api.md#connect_delete_namespaced_service_proxy) | **DELETE** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_delete_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_delete_namespaced_service_proxy_with_path) | **DELETE** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_delete_node_proxy**](docs/CoreV1Api.md#connect_delete_node_proxy) | **DELETE** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_delete_node_proxy_with_path**](docs/CoreV1Api.md#connect_delete_node_proxy_with_path) | **DELETE** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_get_namespaced_pod_attach**](docs/CoreV1Api.md#connect_get_namespaced_pod_attach) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/attach |
+*CoreV1Api* | [**connect_get_namespaced_pod_exec**](docs/CoreV1Api.md#connect_get_namespaced_pod_exec) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/exec |
+*CoreV1Api* | [**connect_get_namespaced_pod_portforward**](docs/CoreV1Api.md#connect_get_namespaced_pod_portforward) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/portforward |
+*CoreV1Api* | [**connect_get_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_get_namespaced_pod_proxy) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_get_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_get_namespaced_pod_proxy_with_path) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_get_namespaced_service_proxy**](docs/CoreV1Api.md#connect_get_namespaced_service_proxy) | **GET** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_get_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_get_namespaced_service_proxy_with_path) | **GET** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_get_node_proxy**](docs/CoreV1Api.md#connect_get_node_proxy) | **GET** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_get_node_proxy_with_path**](docs/CoreV1Api.md#connect_get_node_proxy_with_path) | **GET** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_head_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_head_namespaced_pod_proxy) | **HEAD** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_head_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_head_namespaced_pod_proxy_with_path) | **HEAD** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_head_namespaced_service_proxy**](docs/CoreV1Api.md#connect_head_namespaced_service_proxy) | **HEAD** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_head_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_head_namespaced_service_proxy_with_path) | **HEAD** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_head_node_proxy**](docs/CoreV1Api.md#connect_head_node_proxy) | **HEAD** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_head_node_proxy_with_path**](docs/CoreV1Api.md#connect_head_node_proxy_with_path) | **HEAD** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_options_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_options_namespaced_pod_proxy) | **OPTIONS** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_options_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_options_namespaced_pod_proxy_with_path) | **OPTIONS** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_options_namespaced_service_proxy**](docs/CoreV1Api.md#connect_options_namespaced_service_proxy) | **OPTIONS** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_options_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_options_namespaced_service_proxy_with_path) | **OPTIONS** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_options_node_proxy**](docs/CoreV1Api.md#connect_options_node_proxy) | **OPTIONS** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_options_node_proxy_with_path**](docs/CoreV1Api.md#connect_options_node_proxy_with_path) | **OPTIONS** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_patch_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_patch_namespaced_pod_proxy) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_patch_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_patch_namespaced_pod_proxy_with_path) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_patch_namespaced_service_proxy**](docs/CoreV1Api.md#connect_patch_namespaced_service_proxy) | **PATCH** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_patch_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_patch_namespaced_service_proxy_with_path) | **PATCH** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_patch_node_proxy**](docs/CoreV1Api.md#connect_patch_node_proxy) | **PATCH** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_patch_node_proxy_with_path**](docs/CoreV1Api.md#connect_patch_node_proxy_with_path) | **PATCH** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_post_namespaced_pod_attach**](docs/CoreV1Api.md#connect_post_namespaced_pod_attach) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/attach |
+*CoreV1Api* | [**connect_post_namespaced_pod_exec**](docs/CoreV1Api.md#connect_post_namespaced_pod_exec) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/exec |
+*CoreV1Api* | [**connect_post_namespaced_pod_portforward**](docs/CoreV1Api.md#connect_post_namespaced_pod_portforward) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/portforward |
+*CoreV1Api* | [**connect_post_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_post_namespaced_pod_proxy) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_post_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_post_namespaced_pod_proxy_with_path) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_post_namespaced_service_proxy**](docs/CoreV1Api.md#connect_post_namespaced_service_proxy) | **POST** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_post_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_post_namespaced_service_proxy_with_path) | **POST** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_post_node_proxy**](docs/CoreV1Api.md#connect_post_node_proxy) | **POST** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_post_node_proxy_with_path**](docs/CoreV1Api.md#connect_post_node_proxy_with_path) | **POST** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_put_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_put_namespaced_pod_proxy) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/proxy |
+*CoreV1Api* | [**connect_put_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_put_namespaced_pod_proxy_with_path) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_put_namespaced_service_proxy**](docs/CoreV1Api.md#connect_put_namespaced_service_proxy) | **PUT** /api/v1/namespaces/{namespace}/services/{name}/proxy |
+*CoreV1Api* | [**connect_put_namespaced_service_proxy_with_path**](docs/CoreV1Api.md#connect_put_namespaced_service_proxy_with_path) | **PUT** /api/v1/namespaces/{namespace}/services/{name}/proxy/{path} |
+*CoreV1Api* | [**connect_put_node_proxy**](docs/CoreV1Api.md#connect_put_node_proxy) | **PUT** /api/v1/nodes/{name}/proxy |
+*CoreV1Api* | [**connect_put_node_proxy_with_path**](docs/CoreV1Api.md#connect_put_node_proxy_with_path) | **PUT** /api/v1/nodes/{name}/proxy/{path} |
+*CoreV1Api* | [**create_namespace**](docs/CoreV1Api.md#create_namespace) | **POST** /api/v1/namespaces |
+*CoreV1Api* | [**create_namespaced_binding**](docs/CoreV1Api.md#create_namespaced_binding) | **POST** /api/v1/namespaces/{namespace}/bindings |
+*CoreV1Api* | [**create_namespaced_config_map**](docs/CoreV1Api.md#create_namespaced_config_map) | **POST** /api/v1/namespaces/{namespace}/configmaps |
+*CoreV1Api* | [**create_namespaced_endpoints**](docs/CoreV1Api.md#create_namespaced_endpoints) | **POST** /api/v1/namespaces/{namespace}/endpoints |
+*CoreV1Api* | [**create_namespaced_event**](docs/CoreV1Api.md#create_namespaced_event) | **POST** /api/v1/namespaces/{namespace}/events |
+*CoreV1Api* | [**create_namespaced_limit_range**](docs/CoreV1Api.md#create_namespaced_limit_range) | **POST** /api/v1/namespaces/{namespace}/limitranges |
+*CoreV1Api* | [**create_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#create_namespaced_persistent_volume_claim) | **POST** /api/v1/namespaces/{namespace}/persistentvolumeclaims |
+*CoreV1Api* | [**create_namespaced_pod**](docs/CoreV1Api.md#create_namespaced_pod) | **POST** /api/v1/namespaces/{namespace}/pods |
+*CoreV1Api* | [**create_namespaced_pod_binding**](docs/CoreV1Api.md#create_namespaced_pod_binding) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/binding |
+*CoreV1Api* | [**create_namespaced_pod_eviction**](docs/CoreV1Api.md#create_namespaced_pod_eviction) | **POST** /api/v1/namespaces/{namespace}/pods/{name}/eviction |
+*CoreV1Api* | [**create_namespaced_pod_template**](docs/CoreV1Api.md#create_namespaced_pod_template) | **POST** /api/v1/namespaces/{namespace}/podtemplates |
+*CoreV1Api* | [**create_namespaced_replication_controller**](docs/CoreV1Api.md#create_namespaced_replication_controller) | **POST** /api/v1/namespaces/{namespace}/replicationcontrollers |
+*CoreV1Api* | [**create_namespaced_resource_quota**](docs/CoreV1Api.md#create_namespaced_resource_quota) | **POST** /api/v1/namespaces/{namespace}/resourcequotas |
+*CoreV1Api* | [**create_namespaced_secret**](docs/CoreV1Api.md#create_namespaced_secret) | **POST** /api/v1/namespaces/{namespace}/secrets |
+*CoreV1Api* | [**create_namespaced_service**](docs/CoreV1Api.md#create_namespaced_service) | **POST** /api/v1/namespaces/{namespace}/services |
+*CoreV1Api* | [**create_namespaced_service_account**](docs/CoreV1Api.md#create_namespaced_service_account) | **POST** /api/v1/namespaces/{namespace}/serviceaccounts |
+*CoreV1Api* | [**create_namespaced_service_account_token**](docs/CoreV1Api.md#create_namespaced_service_account_token) | **POST** /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token |
+*CoreV1Api* | [**create_node**](docs/CoreV1Api.md#create_node) | **POST** /api/v1/nodes |
+*CoreV1Api* | [**create_persistent_volume**](docs/CoreV1Api.md#create_persistent_volume) | **POST** /api/v1/persistentvolumes |
+*CoreV1Api* | [**delete_collection_namespaced_config_map**](docs/CoreV1Api.md#delete_collection_namespaced_config_map) | **DELETE** /api/v1/namespaces/{namespace}/configmaps |
+*CoreV1Api* | [**delete_collection_namespaced_endpoints**](docs/CoreV1Api.md#delete_collection_namespaced_endpoints) | **DELETE** /api/v1/namespaces/{namespace}/endpoints |
+*CoreV1Api* | [**delete_collection_namespaced_event**](docs/CoreV1Api.md#delete_collection_namespaced_event) | **DELETE** /api/v1/namespaces/{namespace}/events |
+*CoreV1Api* | [**delete_collection_namespaced_limit_range**](docs/CoreV1Api.md#delete_collection_namespaced_limit_range) | **DELETE** /api/v1/namespaces/{namespace}/limitranges |
+*CoreV1Api* | [**delete_collection_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#delete_collection_namespaced_persistent_volume_claim) | **DELETE** /api/v1/namespaces/{namespace}/persistentvolumeclaims |
+*CoreV1Api* | [**delete_collection_namespaced_pod**](docs/CoreV1Api.md#delete_collection_namespaced_pod) | **DELETE** /api/v1/namespaces/{namespace}/pods |
+*CoreV1Api* | [**delete_collection_namespaced_pod_template**](docs/CoreV1Api.md#delete_collection_namespaced_pod_template) | **DELETE** /api/v1/namespaces/{namespace}/podtemplates |
+*CoreV1Api* | [**delete_collection_namespaced_replication_controller**](docs/CoreV1Api.md#delete_collection_namespaced_replication_controller) | **DELETE** /api/v1/namespaces/{namespace}/replicationcontrollers |
+*CoreV1Api* | [**delete_collection_namespaced_resource_quota**](docs/CoreV1Api.md#delete_collection_namespaced_resource_quota) | **DELETE** /api/v1/namespaces/{namespace}/resourcequotas |
+*CoreV1Api* | [**delete_collection_namespaced_secret**](docs/CoreV1Api.md#delete_collection_namespaced_secret) | **DELETE** /api/v1/namespaces/{namespace}/secrets |
+*CoreV1Api* | [**delete_collection_namespaced_service**](docs/CoreV1Api.md#delete_collection_namespaced_service) | **DELETE** /api/v1/namespaces/{namespace}/services |
+*CoreV1Api* | [**delete_collection_namespaced_service_account**](docs/CoreV1Api.md#delete_collection_namespaced_service_account) | **DELETE** /api/v1/namespaces/{namespace}/serviceaccounts |
+*CoreV1Api* | [**delete_collection_node**](docs/CoreV1Api.md#delete_collection_node) | **DELETE** /api/v1/nodes |
+*CoreV1Api* | [**delete_collection_persistent_volume**](docs/CoreV1Api.md#delete_collection_persistent_volume) | **DELETE** /api/v1/persistentvolumes |
+*CoreV1Api* | [**delete_namespace**](docs/CoreV1Api.md#delete_namespace) | **DELETE** /api/v1/namespaces/{name} |
+*CoreV1Api* | [**delete_namespaced_config_map**](docs/CoreV1Api.md#delete_namespaced_config_map) | **DELETE** /api/v1/namespaces/{namespace}/configmaps/{name} |
+*CoreV1Api* | [**delete_namespaced_endpoints**](docs/CoreV1Api.md#delete_namespaced_endpoints) | **DELETE** /api/v1/namespaces/{namespace}/endpoints/{name} |
+*CoreV1Api* | [**delete_namespaced_event**](docs/CoreV1Api.md#delete_namespaced_event) | **DELETE** /api/v1/namespaces/{namespace}/events/{name} |
+*CoreV1Api* | [**delete_namespaced_limit_range**](docs/CoreV1Api.md#delete_namespaced_limit_range) | **DELETE** /api/v1/namespaces/{namespace}/limitranges/{name} |
+*CoreV1Api* | [**delete_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#delete_namespaced_persistent_volume_claim) | **DELETE** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} |
+*CoreV1Api* | [**delete_namespaced_pod**](docs/CoreV1Api.md#delete_namespaced_pod) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name} |
+*CoreV1Api* | [**delete_namespaced_pod_template**](docs/CoreV1Api.md#delete_namespaced_pod_template) | **DELETE** /api/v1/namespaces/{namespace}/podtemplates/{name} |
+*CoreV1Api* | [**delete_namespaced_replication_controller**](docs/CoreV1Api.md#delete_namespaced_replication_controller) | **DELETE** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} |
+*CoreV1Api* | [**delete_namespaced_resource_quota**](docs/CoreV1Api.md#delete_namespaced_resource_quota) | **DELETE** /api/v1/namespaces/{namespace}/resourcequotas/{name} |
+*CoreV1Api* | [**delete_namespaced_secret**](docs/CoreV1Api.md#delete_namespaced_secret) | **DELETE** /api/v1/namespaces/{namespace}/secrets/{name} |
+*CoreV1Api* | [**delete_namespaced_service**](docs/CoreV1Api.md#delete_namespaced_service) | **DELETE** /api/v1/namespaces/{namespace}/services/{name} |
+*CoreV1Api* | [**delete_namespaced_service_account**](docs/CoreV1Api.md#delete_namespaced_service_account) | **DELETE** /api/v1/namespaces/{namespace}/serviceaccounts/{name} |
+*CoreV1Api* | [**delete_node**](docs/CoreV1Api.md#delete_node) | **DELETE** /api/v1/nodes/{name} |
+*CoreV1Api* | [**delete_persistent_volume**](docs/CoreV1Api.md#delete_persistent_volume) | **DELETE** /api/v1/persistentvolumes/{name} |
+*CoreV1Api* | [**get_api_resources**](docs/CoreV1Api.md#get_api_resources) | **GET** /api/v1/ |
+*CoreV1Api* | [**list_component_status**](docs/CoreV1Api.md#list_component_status) | **GET** /api/v1/componentstatuses |
+*CoreV1Api* | [**list_config_map_for_all_namespaces**](docs/CoreV1Api.md#list_config_map_for_all_namespaces) | **GET** /api/v1/configmaps |
+*CoreV1Api* | [**list_endpoints_for_all_namespaces**](docs/CoreV1Api.md#list_endpoints_for_all_namespaces) | **GET** /api/v1/endpoints |
+*CoreV1Api* | [**list_event_for_all_namespaces**](docs/CoreV1Api.md#list_event_for_all_namespaces) | **GET** /api/v1/events |
+*CoreV1Api* | [**list_limit_range_for_all_namespaces**](docs/CoreV1Api.md#list_limit_range_for_all_namespaces) | **GET** /api/v1/limitranges |
+*CoreV1Api* | [**list_namespace**](docs/CoreV1Api.md#list_namespace) | **GET** /api/v1/namespaces |
+*CoreV1Api* | [**list_namespaced_config_map**](docs/CoreV1Api.md#list_namespaced_config_map) | **GET** /api/v1/namespaces/{namespace}/configmaps |
+*CoreV1Api* | [**list_namespaced_endpoints**](docs/CoreV1Api.md#list_namespaced_endpoints) | **GET** /api/v1/namespaces/{namespace}/endpoints |
+*CoreV1Api* | [**list_namespaced_event**](docs/CoreV1Api.md#list_namespaced_event) | **GET** /api/v1/namespaces/{namespace}/events |
+*CoreV1Api* | [**list_namespaced_limit_range**](docs/CoreV1Api.md#list_namespaced_limit_range) | **GET** /api/v1/namespaces/{namespace}/limitranges |
+*CoreV1Api* | [**list_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#list_namespaced_persistent_volume_claim) | **GET** /api/v1/namespaces/{namespace}/persistentvolumeclaims |
+*CoreV1Api* | [**list_namespaced_pod**](docs/CoreV1Api.md#list_namespaced_pod) | **GET** /api/v1/namespaces/{namespace}/pods |
+*CoreV1Api* | [**list_namespaced_pod_template**](docs/CoreV1Api.md#list_namespaced_pod_template) | **GET** /api/v1/namespaces/{namespace}/podtemplates |
+*CoreV1Api* | [**list_namespaced_replication_controller**](docs/CoreV1Api.md#list_namespaced_replication_controller) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers |
+*CoreV1Api* | [**list_namespaced_resource_quota**](docs/CoreV1Api.md#list_namespaced_resource_quota) | **GET** /api/v1/namespaces/{namespace}/resourcequotas |
+*CoreV1Api* | [**list_namespaced_secret**](docs/CoreV1Api.md#list_namespaced_secret) | **GET** /api/v1/namespaces/{namespace}/secrets |
+*CoreV1Api* | [**list_namespaced_service**](docs/CoreV1Api.md#list_namespaced_service) | **GET** /api/v1/namespaces/{namespace}/services |
+*CoreV1Api* | [**list_namespaced_service_account**](docs/CoreV1Api.md#list_namespaced_service_account) | **GET** /api/v1/namespaces/{namespace}/serviceaccounts |
+*CoreV1Api* | [**list_node**](docs/CoreV1Api.md#list_node) | **GET** /api/v1/nodes |
+*CoreV1Api* | [**list_persistent_volume**](docs/CoreV1Api.md#list_persistent_volume) | **GET** /api/v1/persistentvolumes |
+*CoreV1Api* | [**list_persistent_volume_claim_for_all_namespaces**](docs/CoreV1Api.md#list_persistent_volume_claim_for_all_namespaces) | **GET** /api/v1/persistentvolumeclaims |
+*CoreV1Api* | [**list_pod_for_all_namespaces**](docs/CoreV1Api.md#list_pod_for_all_namespaces) | **GET** /api/v1/pods |
+*CoreV1Api* | [**list_pod_template_for_all_namespaces**](docs/CoreV1Api.md#list_pod_template_for_all_namespaces) | **GET** /api/v1/podtemplates |
+*CoreV1Api* | [**list_replication_controller_for_all_namespaces**](docs/CoreV1Api.md#list_replication_controller_for_all_namespaces) | **GET** /api/v1/replicationcontrollers |
+*CoreV1Api* | [**list_resource_quota_for_all_namespaces**](docs/CoreV1Api.md#list_resource_quota_for_all_namespaces) | **GET** /api/v1/resourcequotas |
+*CoreV1Api* | [**list_secret_for_all_namespaces**](docs/CoreV1Api.md#list_secret_for_all_namespaces) | **GET** /api/v1/secrets |
+*CoreV1Api* | [**list_service_account_for_all_namespaces**](docs/CoreV1Api.md#list_service_account_for_all_namespaces) | **GET** /api/v1/serviceaccounts |
+*CoreV1Api* | [**list_service_for_all_namespaces**](docs/CoreV1Api.md#list_service_for_all_namespaces) | **GET** /api/v1/services |
+*CoreV1Api* | [**patch_namespace**](docs/CoreV1Api.md#patch_namespace) | **PATCH** /api/v1/namespaces/{name} |
+*CoreV1Api* | [**patch_namespace_status**](docs/CoreV1Api.md#patch_namespace_status) | **PATCH** /api/v1/namespaces/{name}/status |
+*CoreV1Api* | [**patch_namespaced_config_map**](docs/CoreV1Api.md#patch_namespaced_config_map) | **PATCH** /api/v1/namespaces/{namespace}/configmaps/{name} |
+*CoreV1Api* | [**patch_namespaced_endpoints**](docs/CoreV1Api.md#patch_namespaced_endpoints) | **PATCH** /api/v1/namespaces/{namespace}/endpoints/{name} |
+*CoreV1Api* | [**patch_namespaced_event**](docs/CoreV1Api.md#patch_namespaced_event) | **PATCH** /api/v1/namespaces/{namespace}/events/{name} |
+*CoreV1Api* | [**patch_namespaced_limit_range**](docs/CoreV1Api.md#patch_namespaced_limit_range) | **PATCH** /api/v1/namespaces/{namespace}/limitranges/{name} |
+*CoreV1Api* | [**patch_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#patch_namespaced_persistent_volume_claim) | **PATCH** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} |
+*CoreV1Api* | [**patch_namespaced_persistent_volume_claim_status**](docs/CoreV1Api.md#patch_namespaced_persistent_volume_claim_status) | **PATCH** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status |
+*CoreV1Api* | [**patch_namespaced_pod**](docs/CoreV1Api.md#patch_namespaced_pod) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name} |
+*CoreV1Api* | [**patch_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#patch_namespaced_pod_ephemeralcontainers) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers |
+*CoreV1Api* | [**patch_namespaced_pod_resize**](docs/CoreV1Api.md#patch_namespaced_pod_resize) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/resize |
+*CoreV1Api* | [**patch_namespaced_pod_status**](docs/CoreV1Api.md#patch_namespaced_pod_status) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/status |
+*CoreV1Api* | [**patch_namespaced_pod_template**](docs/CoreV1Api.md#patch_namespaced_pod_template) | **PATCH** /api/v1/namespaces/{namespace}/podtemplates/{name} |
+*CoreV1Api* | [**patch_namespaced_replication_controller**](docs/CoreV1Api.md#patch_namespaced_replication_controller) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} |
+*CoreV1Api* | [**patch_namespaced_replication_controller_scale**](docs/CoreV1Api.md#patch_namespaced_replication_controller_scale) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale |
+*CoreV1Api* | [**patch_namespaced_replication_controller_status**](docs/CoreV1Api.md#patch_namespaced_replication_controller_status) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status |
+*CoreV1Api* | [**patch_namespaced_resource_quota**](docs/CoreV1Api.md#patch_namespaced_resource_quota) | **PATCH** /api/v1/namespaces/{namespace}/resourcequotas/{name} |
+*CoreV1Api* | [**patch_namespaced_resource_quota_status**](docs/CoreV1Api.md#patch_namespaced_resource_quota_status) | **PATCH** /api/v1/namespaces/{namespace}/resourcequotas/{name}/status |
+*CoreV1Api* | [**patch_namespaced_secret**](docs/CoreV1Api.md#patch_namespaced_secret) | **PATCH** /api/v1/namespaces/{namespace}/secrets/{name} |
+*CoreV1Api* | [**patch_namespaced_service**](docs/CoreV1Api.md#patch_namespaced_service) | **PATCH** /api/v1/namespaces/{namespace}/services/{name} |
+*CoreV1Api* | [**patch_namespaced_service_account**](docs/CoreV1Api.md#patch_namespaced_service_account) | **PATCH** /api/v1/namespaces/{namespace}/serviceaccounts/{name} |
+*CoreV1Api* | [**patch_namespaced_service_status**](docs/CoreV1Api.md#patch_namespaced_service_status) | **PATCH** /api/v1/namespaces/{namespace}/services/{name}/status |
+*CoreV1Api* | [**patch_node**](docs/CoreV1Api.md#patch_node) | **PATCH** /api/v1/nodes/{name} |
+*CoreV1Api* | [**patch_node_status**](docs/CoreV1Api.md#patch_node_status) | **PATCH** /api/v1/nodes/{name}/status |
+*CoreV1Api* | [**patch_persistent_volume**](docs/CoreV1Api.md#patch_persistent_volume) | **PATCH** /api/v1/persistentvolumes/{name} |
+*CoreV1Api* | [**patch_persistent_volume_status**](docs/CoreV1Api.md#patch_persistent_volume_status) | **PATCH** /api/v1/persistentvolumes/{name}/status |
+*CoreV1Api* | [**read_component_status**](docs/CoreV1Api.md#read_component_status) | **GET** /api/v1/componentstatuses/{name} |
+*CoreV1Api* | [**read_namespace**](docs/CoreV1Api.md#read_namespace) | **GET** /api/v1/namespaces/{name} |
+*CoreV1Api* | [**read_namespace_status**](docs/CoreV1Api.md#read_namespace_status) | **GET** /api/v1/namespaces/{name}/status |
+*CoreV1Api* | [**read_namespaced_config_map**](docs/CoreV1Api.md#read_namespaced_config_map) | **GET** /api/v1/namespaces/{namespace}/configmaps/{name} |
+*CoreV1Api* | [**read_namespaced_endpoints**](docs/CoreV1Api.md#read_namespaced_endpoints) | **GET** /api/v1/namespaces/{namespace}/endpoints/{name} |
+*CoreV1Api* | [**read_namespaced_event**](docs/CoreV1Api.md#read_namespaced_event) | **GET** /api/v1/namespaces/{namespace}/events/{name} |
+*CoreV1Api* | [**read_namespaced_limit_range**](docs/CoreV1Api.md#read_namespaced_limit_range) | **GET** /api/v1/namespaces/{namespace}/limitranges/{name} |
+*CoreV1Api* | [**read_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#read_namespaced_persistent_volume_claim) | **GET** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} |
+*CoreV1Api* | [**read_namespaced_persistent_volume_claim_status**](docs/CoreV1Api.md#read_namespaced_persistent_volume_claim_status) | **GET** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status |
+*CoreV1Api* | [**read_namespaced_pod**](docs/CoreV1Api.md#read_namespaced_pod) | **GET** /api/v1/namespaces/{namespace}/pods/{name} |
+*CoreV1Api* | [**read_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#read_namespaced_pod_ephemeralcontainers) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers |
+*CoreV1Api* | [**read_namespaced_pod_log**](docs/CoreV1Api.md#read_namespaced_pod_log) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/log |
+*CoreV1Api* | [**read_namespaced_pod_resize**](docs/CoreV1Api.md#read_namespaced_pod_resize) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/resize |
+*CoreV1Api* | [**read_namespaced_pod_status**](docs/CoreV1Api.md#read_namespaced_pod_status) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/status |
+*CoreV1Api* | [**read_namespaced_pod_template**](docs/CoreV1Api.md#read_namespaced_pod_template) | **GET** /api/v1/namespaces/{namespace}/podtemplates/{name} |
+*CoreV1Api* | [**read_namespaced_replication_controller**](docs/CoreV1Api.md#read_namespaced_replication_controller) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} |
+*CoreV1Api* | [**read_namespaced_replication_controller_scale**](docs/CoreV1Api.md#read_namespaced_replication_controller_scale) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale |
+*CoreV1Api* | [**read_namespaced_replication_controller_status**](docs/CoreV1Api.md#read_namespaced_replication_controller_status) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status |
+*CoreV1Api* | [**read_namespaced_resource_quota**](docs/CoreV1Api.md#read_namespaced_resource_quota) | **GET** /api/v1/namespaces/{namespace}/resourcequotas/{name} |
+*CoreV1Api* | [**read_namespaced_resource_quota_status**](docs/CoreV1Api.md#read_namespaced_resource_quota_status) | **GET** /api/v1/namespaces/{namespace}/resourcequotas/{name}/status |
+*CoreV1Api* | [**read_namespaced_secret**](docs/CoreV1Api.md#read_namespaced_secret) | **GET** /api/v1/namespaces/{namespace}/secrets/{name} |
+*CoreV1Api* | [**read_namespaced_service**](docs/CoreV1Api.md#read_namespaced_service) | **GET** /api/v1/namespaces/{namespace}/services/{name} |
+*CoreV1Api* | [**read_namespaced_service_account**](docs/CoreV1Api.md#read_namespaced_service_account) | **GET** /api/v1/namespaces/{namespace}/serviceaccounts/{name} |
+*CoreV1Api* | [**read_namespaced_service_status**](docs/CoreV1Api.md#read_namespaced_service_status) | **GET** /api/v1/namespaces/{namespace}/services/{name}/status |
+*CoreV1Api* | [**read_node**](docs/CoreV1Api.md#read_node) | **GET** /api/v1/nodes/{name} |
+*CoreV1Api* | [**read_node_status**](docs/CoreV1Api.md#read_node_status) | **GET** /api/v1/nodes/{name}/status |
+*CoreV1Api* | [**read_persistent_volume**](docs/CoreV1Api.md#read_persistent_volume) | **GET** /api/v1/persistentvolumes/{name} |
+*CoreV1Api* | [**read_persistent_volume_status**](docs/CoreV1Api.md#read_persistent_volume_status) | **GET** /api/v1/persistentvolumes/{name}/status |
+*CoreV1Api* | [**replace_namespace**](docs/CoreV1Api.md#replace_namespace) | **PUT** /api/v1/namespaces/{name} |
+*CoreV1Api* | [**replace_namespace_finalize**](docs/CoreV1Api.md#replace_namespace_finalize) | **PUT** /api/v1/namespaces/{name}/finalize |
+*CoreV1Api* | [**replace_namespace_status**](docs/CoreV1Api.md#replace_namespace_status) | **PUT** /api/v1/namespaces/{name}/status |
+*CoreV1Api* | [**replace_namespaced_config_map**](docs/CoreV1Api.md#replace_namespaced_config_map) | **PUT** /api/v1/namespaces/{namespace}/configmaps/{name} |
+*CoreV1Api* | [**replace_namespaced_endpoints**](docs/CoreV1Api.md#replace_namespaced_endpoints) | **PUT** /api/v1/namespaces/{namespace}/endpoints/{name} |
+*CoreV1Api* | [**replace_namespaced_event**](docs/CoreV1Api.md#replace_namespaced_event) | **PUT** /api/v1/namespaces/{namespace}/events/{name} |
+*CoreV1Api* | [**replace_namespaced_limit_range**](docs/CoreV1Api.md#replace_namespaced_limit_range) | **PUT** /api/v1/namespaces/{namespace}/limitranges/{name} |
+*CoreV1Api* | [**replace_namespaced_persistent_volume_claim**](docs/CoreV1Api.md#replace_namespaced_persistent_volume_claim) | **PUT** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} |
+*CoreV1Api* | [**replace_namespaced_persistent_volume_claim_status**](docs/CoreV1Api.md#replace_namespaced_persistent_volume_claim_status) | **PUT** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status |
+*CoreV1Api* | [**replace_namespaced_pod**](docs/CoreV1Api.md#replace_namespaced_pod) | **PUT** /api/v1/namespaces/{namespace}/pods/{name} |
+*CoreV1Api* | [**replace_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#replace_namespaced_pod_ephemeralcontainers) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers |
+*CoreV1Api* | [**replace_namespaced_pod_resize**](docs/CoreV1Api.md#replace_namespaced_pod_resize) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/resize |
+*CoreV1Api* | [**replace_namespaced_pod_status**](docs/CoreV1Api.md#replace_namespaced_pod_status) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/status |
+*CoreV1Api* | [**replace_namespaced_pod_template**](docs/CoreV1Api.md#replace_namespaced_pod_template) | **PUT** /api/v1/namespaces/{namespace}/podtemplates/{name} |
+*CoreV1Api* | [**replace_namespaced_replication_controller**](docs/CoreV1Api.md#replace_namespaced_replication_controller) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} |
+*CoreV1Api* | [**replace_namespaced_replication_controller_scale**](docs/CoreV1Api.md#replace_namespaced_replication_controller_scale) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale |
+*CoreV1Api* | [**replace_namespaced_replication_controller_status**](docs/CoreV1Api.md#replace_namespaced_replication_controller_status) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status |
+*CoreV1Api* | [**replace_namespaced_resource_quota**](docs/CoreV1Api.md#replace_namespaced_resource_quota) | **PUT** /api/v1/namespaces/{namespace}/resourcequotas/{name} |
+*CoreV1Api* | [**replace_namespaced_resource_quota_status**](docs/CoreV1Api.md#replace_namespaced_resource_quota_status) | **PUT** /api/v1/namespaces/{namespace}/resourcequotas/{name}/status |
+*CoreV1Api* | [**replace_namespaced_secret**](docs/CoreV1Api.md#replace_namespaced_secret) | **PUT** /api/v1/namespaces/{namespace}/secrets/{name} |
+*CoreV1Api* | [**replace_namespaced_service**](docs/CoreV1Api.md#replace_namespaced_service) | **PUT** /api/v1/namespaces/{namespace}/services/{name} |
+*CoreV1Api* | [**replace_namespaced_service_account**](docs/CoreV1Api.md#replace_namespaced_service_account) | **PUT** /api/v1/namespaces/{namespace}/serviceaccounts/{name} |
+*CoreV1Api* | [**replace_namespaced_service_status**](docs/CoreV1Api.md#replace_namespaced_service_status) | **PUT** /api/v1/namespaces/{namespace}/services/{name}/status |
+*CoreV1Api* | [**replace_node**](docs/CoreV1Api.md#replace_node) | **PUT** /api/v1/nodes/{name} |
+*CoreV1Api* | [**replace_node_status**](docs/CoreV1Api.md#replace_node_status) | **PUT** /api/v1/nodes/{name}/status |
+*CoreV1Api* | [**replace_persistent_volume**](docs/CoreV1Api.md#replace_persistent_volume) | **PUT** /api/v1/persistentvolumes/{name} |
+*CoreV1Api* | [**replace_persistent_volume_status**](docs/CoreV1Api.md#replace_persistent_volume_status) | **PUT** /api/v1/persistentvolumes/{name}/status |
+*CustomObjectsApi* | [**create_cluster_custom_object**](docs/CustomObjectsApi.md#create_cluster_custom_object) | **POST** /apis/{group}/{version}/{plural} |
+*CustomObjectsApi* | [**create_namespaced_custom_object**](docs/CustomObjectsApi.md#create_namespaced_custom_object) | **POST** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
+*CustomObjectsApi* | [**delete_cluster_custom_object**](docs/CustomObjectsApi.md#delete_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural}/{name} |
+*CustomObjectsApi* | [**delete_collection_cluster_custom_object**](docs/CustomObjectsApi.md#delete_collection_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} |
+*CustomObjectsApi* | [**delete_collection_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_collection_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
+*CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
+*CustomObjectsApi* | [**get_api_resources**](docs/CustomObjectsApi.md#get_api_resources) | **GET** /apis/{group}/{version} |
+*CustomObjectsApi* | [**get_cluster_custom_object**](docs/CustomObjectsApi.md#get_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural}/{name} |
+*CustomObjectsApi* | [**get_cluster_custom_object_scale**](docs/CustomObjectsApi.md#get_cluster_custom_object_scale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**get_cluster_custom_object_status**](docs/CustomObjectsApi.md#get_cluster_custom_object_status) | **GET** /apis/{group}/{version}/{plural}/{name}/status |
+*CustomObjectsApi* | [**get_namespaced_custom_object**](docs/CustomObjectsApi.md#get_namespaced_custom_object) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
+*CustomObjectsApi* | [**get_namespaced_custom_object_scale**](docs/CustomObjectsApi.md#get_namespaced_custom_object_scale) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**get_namespaced_custom_object_status**](docs/CustomObjectsApi.md#get_namespaced_custom_object_status) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status |
+*CustomObjectsApi* | [**list_cluster_custom_object**](docs/CustomObjectsApi.md#list_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural} |
+*CustomObjectsApi* | [**list_custom_object_for_all_namespaces**](docs/CustomObjectsApi.md#list_custom_object_for_all_namespaces) | **GET** /apis/{group}/{version}/{resource_plural} |
+*CustomObjectsApi* | [**list_namespaced_custom_object**](docs/CustomObjectsApi.md#list_namespaced_custom_object) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
+*CustomObjectsApi* | [**patch_cluster_custom_object**](docs/CustomObjectsApi.md#patch_cluster_custom_object) | **PATCH** /apis/{group}/{version}/{plural}/{name} |
+*CustomObjectsApi* | [**patch_cluster_custom_object_scale**](docs/CustomObjectsApi.md#patch_cluster_custom_object_scale) | **PATCH** /apis/{group}/{version}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**patch_cluster_custom_object_status**](docs/CustomObjectsApi.md#patch_cluster_custom_object_status) | **PATCH** /apis/{group}/{version}/{plural}/{name}/status |
+*CustomObjectsApi* | [**patch_namespaced_custom_object**](docs/CustomObjectsApi.md#patch_namespaced_custom_object) | **PATCH** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
+*CustomObjectsApi* | [**patch_namespaced_custom_object_scale**](docs/CustomObjectsApi.md#patch_namespaced_custom_object_scale) | **PATCH** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**patch_namespaced_custom_object_status**](docs/CustomObjectsApi.md#patch_namespaced_custom_object_status) | **PATCH** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status |
+*CustomObjectsApi* | [**replace_cluster_custom_object**](docs/CustomObjectsApi.md#replace_cluster_custom_object) | **PUT** /apis/{group}/{version}/{plural}/{name} |
+*CustomObjectsApi* | [**replace_cluster_custom_object_scale**](docs/CustomObjectsApi.md#replace_cluster_custom_object_scale) | **PUT** /apis/{group}/{version}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**replace_cluster_custom_object_status**](docs/CustomObjectsApi.md#replace_cluster_custom_object_status) | **PUT** /apis/{group}/{version}/{plural}/{name}/status |
+*CustomObjectsApi* | [**replace_namespaced_custom_object**](docs/CustomObjectsApi.md#replace_namespaced_custom_object) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
+*CustomObjectsApi* | [**replace_namespaced_custom_object_scale**](docs/CustomObjectsApi.md#replace_namespaced_custom_object_scale) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale |
+*CustomObjectsApi* | [**replace_namespaced_custom_object_status**](docs/CustomObjectsApi.md#replace_namespaced_custom_object_status) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status |
+*DiscoveryApi* | [**get_api_group**](docs/DiscoveryApi.md#get_api_group) | **GET** /apis/discovery.k8s.io/ |
+*DiscoveryV1Api* | [**create_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#create_namespaced_endpoint_slice) | **POST** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices |
+*DiscoveryV1Api* | [**delete_collection_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#delete_collection_namespaced_endpoint_slice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices |
+*DiscoveryV1Api* | [**delete_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#delete_namespaced_endpoint_slice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} |
+*DiscoveryV1Api* | [**get_api_resources**](docs/DiscoveryV1Api.md#get_api_resources) | **GET** /apis/discovery.k8s.io/v1/ |
+*DiscoveryV1Api* | [**list_endpoint_slice_for_all_namespaces**](docs/DiscoveryV1Api.md#list_endpoint_slice_for_all_namespaces) | **GET** /apis/discovery.k8s.io/v1/endpointslices |
+*DiscoveryV1Api* | [**list_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#list_namespaced_endpoint_slice) | **GET** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices |
+*DiscoveryV1Api* | [**patch_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#patch_namespaced_endpoint_slice) | **PATCH** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} |
+*DiscoveryV1Api* | [**read_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#read_namespaced_endpoint_slice) | **GET** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} |
+*DiscoveryV1Api* | [**replace_namespaced_endpoint_slice**](docs/DiscoveryV1Api.md#replace_namespaced_endpoint_slice) | **PUT** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} |
+*EventsApi* | [**get_api_group**](docs/EventsApi.md#get_api_group) | **GET** /apis/events.k8s.io/ |
+*EventsV1Api* | [**create_namespaced_event**](docs/EventsV1Api.md#create_namespaced_event) | **POST** /apis/events.k8s.io/v1/namespaces/{namespace}/events |
+*EventsV1Api* | [**delete_collection_namespaced_event**](docs/EventsV1Api.md#delete_collection_namespaced_event) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events |
+*EventsV1Api* | [**delete_namespaced_event**](docs/EventsV1Api.md#delete_namespaced_event) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} |
+*EventsV1Api* | [**get_api_resources**](docs/EventsV1Api.md#get_api_resources) | **GET** /apis/events.k8s.io/v1/ |
+*EventsV1Api* | [**list_event_for_all_namespaces**](docs/EventsV1Api.md#list_event_for_all_namespaces) | **GET** /apis/events.k8s.io/v1/events |
+*EventsV1Api* | [**list_namespaced_event**](docs/EventsV1Api.md#list_namespaced_event) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events |
+*EventsV1Api* | [**patch_namespaced_event**](docs/EventsV1Api.md#patch_namespaced_event) | **PATCH** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} |
+*EventsV1Api* | [**read_namespaced_event**](docs/EventsV1Api.md#read_namespaced_event) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} |
+*EventsV1Api* | [**replace_namespaced_event**](docs/EventsV1Api.md#replace_namespaced_event) | **PUT** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} |
+*FlowcontrolApiserverApi* | [**get_api_group**](docs/FlowcontrolApiserverApi.md#get_api_group) | **GET** /apis/flowcontrol.apiserver.k8s.io/ |
+*FlowcontrolApiserverV1Api* | [**create_flow_schema**](docs/FlowcontrolApiserverV1Api.md#create_flow_schema) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas |
+*FlowcontrolApiserverV1Api* | [**create_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#create_priority_level_configuration) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations |
+*FlowcontrolApiserverV1Api* | [**delete_collection_flow_schema**](docs/FlowcontrolApiserverV1Api.md#delete_collection_flow_schema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas |
+*FlowcontrolApiserverV1Api* | [**delete_collection_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#delete_collection_priority_level_configuration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations |
+*FlowcontrolApiserverV1Api* | [**delete_flow_schema**](docs/FlowcontrolApiserverV1Api.md#delete_flow_schema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} |
+*FlowcontrolApiserverV1Api* | [**delete_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#delete_priority_level_configuration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} |
+*FlowcontrolApiserverV1Api* | [**get_api_resources**](docs/FlowcontrolApiserverV1Api.md#get_api_resources) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/ |
+*FlowcontrolApiserverV1Api* | [**list_flow_schema**](docs/FlowcontrolApiserverV1Api.md#list_flow_schema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas |
+*FlowcontrolApiserverV1Api* | [**list_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#list_priority_level_configuration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations |
+*FlowcontrolApiserverV1Api* | [**patch_flow_schema**](docs/FlowcontrolApiserverV1Api.md#patch_flow_schema) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} |
+*FlowcontrolApiserverV1Api* | [**patch_flow_schema_status**](docs/FlowcontrolApiserverV1Api.md#patch_flow_schema_status) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status |
+*FlowcontrolApiserverV1Api* | [**patch_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#patch_priority_level_configuration) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} |
+*FlowcontrolApiserverV1Api* | [**patch_priority_level_configuration_status**](docs/FlowcontrolApiserverV1Api.md#patch_priority_level_configuration_status) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status |
+*FlowcontrolApiserverV1Api* | [**read_flow_schema**](docs/FlowcontrolApiserverV1Api.md#read_flow_schema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} |
+*FlowcontrolApiserverV1Api* | [**read_flow_schema_status**](docs/FlowcontrolApiserverV1Api.md#read_flow_schema_status) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status |
+*FlowcontrolApiserverV1Api* | [**read_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#read_priority_level_configuration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} |
+*FlowcontrolApiserverV1Api* | [**read_priority_level_configuration_status**](docs/FlowcontrolApiserverV1Api.md#read_priority_level_configuration_status) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status |
+*FlowcontrolApiserverV1Api* | [**replace_flow_schema**](docs/FlowcontrolApiserverV1Api.md#replace_flow_schema) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} |
+*FlowcontrolApiserverV1Api* | [**replace_flow_schema_status**](docs/FlowcontrolApiserverV1Api.md#replace_flow_schema_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status |
+*FlowcontrolApiserverV1Api* | [**replace_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#replace_priority_level_configuration) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} |
+*FlowcontrolApiserverV1Api* | [**replace_priority_level_configuration_status**](docs/FlowcontrolApiserverV1Api.md#replace_priority_level_configuration_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status |
+*InternalApiserverApi* | [**get_api_group**](docs/InternalApiserverApi.md#get_api_group) | **GET** /apis/internal.apiserver.k8s.io/ |
+*InternalApiserverV1alpha1Api* | [**create_storage_version**](docs/InternalApiserverV1alpha1Api.md#create_storage_version) | **POST** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions |
+*InternalApiserverV1alpha1Api* | [**delete_collection_storage_version**](docs/InternalApiserverV1alpha1Api.md#delete_collection_storage_version) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions |
+*InternalApiserverV1alpha1Api* | [**delete_storage_version**](docs/InternalApiserverV1alpha1Api.md#delete_storage_version) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} |
+*InternalApiserverV1alpha1Api* | [**get_api_resources**](docs/InternalApiserverV1alpha1Api.md#get_api_resources) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/ |
+*InternalApiserverV1alpha1Api* | [**list_storage_version**](docs/InternalApiserverV1alpha1Api.md#list_storage_version) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions |
+*InternalApiserverV1alpha1Api* | [**patch_storage_version**](docs/InternalApiserverV1alpha1Api.md#patch_storage_version) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} |
+*InternalApiserverV1alpha1Api* | [**patch_storage_version_status**](docs/InternalApiserverV1alpha1Api.md#patch_storage_version_status) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status |
+*InternalApiserverV1alpha1Api* | [**read_storage_version**](docs/InternalApiserverV1alpha1Api.md#read_storage_version) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} |
+*InternalApiserverV1alpha1Api* | [**read_storage_version_status**](docs/InternalApiserverV1alpha1Api.md#read_storage_version_status) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status |
+*InternalApiserverV1alpha1Api* | [**replace_storage_version**](docs/InternalApiserverV1alpha1Api.md#replace_storage_version) | **PUT** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} |
+*InternalApiserverV1alpha1Api* | [**replace_storage_version_status**](docs/InternalApiserverV1alpha1Api.md#replace_storage_version_status) | **PUT** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status |
+*LogsApi* | [**log_file_handler**](docs/LogsApi.md#log_file_handler) | **GET** /logs/{logpath} |
+*LogsApi* | [**log_file_list_handler**](docs/LogsApi.md#log_file_list_handler) | **GET** /logs/ |
+*NetworkingApi* | [**get_api_group**](docs/NetworkingApi.md#get_api_group) | **GET** /apis/networking.k8s.io/ |
+*NetworkingV1Api* | [**create_ingress_class**](docs/NetworkingV1Api.md#create_ingress_class) | **POST** /apis/networking.k8s.io/v1/ingressclasses |
+*NetworkingV1Api* | [**create_ip_address**](docs/NetworkingV1Api.md#create_ip_address) | **POST** /apis/networking.k8s.io/v1/ipaddresses |
+*NetworkingV1Api* | [**create_namespaced_ingress**](docs/NetworkingV1Api.md#create_namespaced_ingress) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses |
+*NetworkingV1Api* | [**create_namespaced_network_policy**](docs/NetworkingV1Api.md#create_namespaced_network_policy) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies |
+*NetworkingV1Api* | [**create_service_cidr**](docs/NetworkingV1Api.md#create_service_cidr) | **POST** /apis/networking.k8s.io/v1/servicecidrs |
+*NetworkingV1Api* | [**delete_collection_ingress_class**](docs/NetworkingV1Api.md#delete_collection_ingress_class) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses |
+*NetworkingV1Api* | [**delete_collection_ip_address**](docs/NetworkingV1Api.md#delete_collection_ip_address) | **DELETE** /apis/networking.k8s.io/v1/ipaddresses |
+*NetworkingV1Api* | [**delete_collection_namespaced_ingress**](docs/NetworkingV1Api.md#delete_collection_namespaced_ingress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses |
+*NetworkingV1Api* | [**delete_collection_namespaced_network_policy**](docs/NetworkingV1Api.md#delete_collection_namespaced_network_policy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies |
+*NetworkingV1Api* | [**delete_collection_service_cidr**](docs/NetworkingV1Api.md#delete_collection_service_cidr) | **DELETE** /apis/networking.k8s.io/v1/servicecidrs |
+*NetworkingV1Api* | [**delete_ingress_class**](docs/NetworkingV1Api.md#delete_ingress_class) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses/{name} |
+*NetworkingV1Api* | [**delete_ip_address**](docs/NetworkingV1Api.md#delete_ip_address) | **DELETE** /apis/networking.k8s.io/v1/ipaddresses/{name} |
+*NetworkingV1Api* | [**delete_namespaced_ingress**](docs/NetworkingV1Api.md#delete_namespaced_ingress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} |
+*NetworkingV1Api* | [**delete_namespaced_network_policy**](docs/NetworkingV1Api.md#delete_namespaced_network_policy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} |
+*NetworkingV1Api* | [**delete_service_cidr**](docs/NetworkingV1Api.md#delete_service_cidr) | **DELETE** /apis/networking.k8s.io/v1/servicecidrs/{name} |
+*NetworkingV1Api* | [**get_api_resources**](docs/NetworkingV1Api.md#get_api_resources) | **GET** /apis/networking.k8s.io/v1/ |
+*NetworkingV1Api* | [**list_ingress_class**](docs/NetworkingV1Api.md#list_ingress_class) | **GET** /apis/networking.k8s.io/v1/ingressclasses |
+*NetworkingV1Api* | [**list_ingress_for_all_namespaces**](docs/NetworkingV1Api.md#list_ingress_for_all_namespaces) | **GET** /apis/networking.k8s.io/v1/ingresses |
+*NetworkingV1Api* | [**list_ip_address**](docs/NetworkingV1Api.md#list_ip_address) | **GET** /apis/networking.k8s.io/v1/ipaddresses |
+*NetworkingV1Api* | [**list_namespaced_ingress**](docs/NetworkingV1Api.md#list_namespaced_ingress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses |
+*NetworkingV1Api* | [**list_namespaced_network_policy**](docs/NetworkingV1Api.md#list_namespaced_network_policy) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies |
+*NetworkingV1Api* | [**list_network_policy_for_all_namespaces**](docs/NetworkingV1Api.md#list_network_policy_for_all_namespaces) | **GET** /apis/networking.k8s.io/v1/networkpolicies |
+*NetworkingV1Api* | [**list_service_cidr**](docs/NetworkingV1Api.md#list_service_cidr) | **GET** /apis/networking.k8s.io/v1/servicecidrs |
+*NetworkingV1Api* | [**patch_ingress_class**](docs/NetworkingV1Api.md#patch_ingress_class) | **PATCH** /apis/networking.k8s.io/v1/ingressclasses/{name} |
+*NetworkingV1Api* | [**patch_ip_address**](docs/NetworkingV1Api.md#patch_ip_address) | **PATCH** /apis/networking.k8s.io/v1/ipaddresses/{name} |
+*NetworkingV1Api* | [**patch_namespaced_ingress**](docs/NetworkingV1Api.md#patch_namespaced_ingress) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} |
+*NetworkingV1Api* | [**patch_namespaced_ingress_status**](docs/NetworkingV1Api.md#patch_namespaced_ingress_status) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status |
+*NetworkingV1Api* | [**patch_namespaced_network_policy**](docs/NetworkingV1Api.md#patch_namespaced_network_policy) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} |
+*NetworkingV1Api* | [**patch_service_cidr**](docs/NetworkingV1Api.md#patch_service_cidr) | **PATCH** /apis/networking.k8s.io/v1/servicecidrs/{name} |
+*NetworkingV1Api* | [**patch_service_cidr_status**](docs/NetworkingV1Api.md#patch_service_cidr_status) | **PATCH** /apis/networking.k8s.io/v1/servicecidrs/{name}/status |
+*NetworkingV1Api* | [**read_ingress_class**](docs/NetworkingV1Api.md#read_ingress_class) | **GET** /apis/networking.k8s.io/v1/ingressclasses/{name} |
+*NetworkingV1Api* | [**read_ip_address**](docs/NetworkingV1Api.md#read_ip_address) | **GET** /apis/networking.k8s.io/v1/ipaddresses/{name} |
+*NetworkingV1Api* | [**read_namespaced_ingress**](docs/NetworkingV1Api.md#read_namespaced_ingress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} |
+*NetworkingV1Api* | [**read_namespaced_ingress_status**](docs/NetworkingV1Api.md#read_namespaced_ingress_status) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status |
+*NetworkingV1Api* | [**read_namespaced_network_policy**](docs/NetworkingV1Api.md#read_namespaced_network_policy) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} |
+*NetworkingV1Api* | [**read_service_cidr**](docs/NetworkingV1Api.md#read_service_cidr) | **GET** /apis/networking.k8s.io/v1/servicecidrs/{name} |
+*NetworkingV1Api* | [**read_service_cidr_status**](docs/NetworkingV1Api.md#read_service_cidr_status) | **GET** /apis/networking.k8s.io/v1/servicecidrs/{name}/status |
+*NetworkingV1Api* | [**replace_ingress_class**](docs/NetworkingV1Api.md#replace_ingress_class) | **PUT** /apis/networking.k8s.io/v1/ingressclasses/{name} |
+*NetworkingV1Api* | [**replace_ip_address**](docs/NetworkingV1Api.md#replace_ip_address) | **PUT** /apis/networking.k8s.io/v1/ipaddresses/{name} |
+*NetworkingV1Api* | [**replace_namespaced_ingress**](docs/NetworkingV1Api.md#replace_namespaced_ingress) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} |
+*NetworkingV1Api* | [**replace_namespaced_ingress_status**](docs/NetworkingV1Api.md#replace_namespaced_ingress_status) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status |
+*NetworkingV1Api* | [**replace_namespaced_network_policy**](docs/NetworkingV1Api.md#replace_namespaced_network_policy) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} |
+*NetworkingV1Api* | [**replace_service_cidr**](docs/NetworkingV1Api.md#replace_service_cidr) | **PUT** /apis/networking.k8s.io/v1/servicecidrs/{name} |
+*NetworkingV1Api* | [**replace_service_cidr_status**](docs/NetworkingV1Api.md#replace_service_cidr_status) | **PUT** /apis/networking.k8s.io/v1/servicecidrs/{name}/status |
+*NetworkingV1beta1Api* | [**create_ip_address**](docs/NetworkingV1beta1Api.md#create_ip_address) | **POST** /apis/networking.k8s.io/v1beta1/ipaddresses |
+*NetworkingV1beta1Api* | [**create_service_cidr**](docs/NetworkingV1beta1Api.md#create_service_cidr) | **POST** /apis/networking.k8s.io/v1beta1/servicecidrs |
+*NetworkingV1beta1Api* | [**delete_collection_ip_address**](docs/NetworkingV1beta1Api.md#delete_collection_ip_address) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses |
+*NetworkingV1beta1Api* | [**delete_collection_service_cidr**](docs/NetworkingV1beta1Api.md#delete_collection_service_cidr) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs |
+*NetworkingV1beta1Api* | [**delete_ip_address**](docs/NetworkingV1beta1Api.md#delete_ip_address) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} |
+*NetworkingV1beta1Api* | [**delete_service_cidr**](docs/NetworkingV1beta1Api.md#delete_service_cidr) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} |
+*NetworkingV1beta1Api* | [**get_api_resources**](docs/NetworkingV1beta1Api.md#get_api_resources) | **GET** /apis/networking.k8s.io/v1beta1/ |
+*NetworkingV1beta1Api* | [**list_ip_address**](docs/NetworkingV1beta1Api.md#list_ip_address) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses |
+*NetworkingV1beta1Api* | [**list_service_cidr**](docs/NetworkingV1beta1Api.md#list_service_cidr) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs |
+*NetworkingV1beta1Api* | [**patch_ip_address**](docs/NetworkingV1beta1Api.md#patch_ip_address) | **PATCH** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} |
+*NetworkingV1beta1Api* | [**patch_service_cidr**](docs/NetworkingV1beta1Api.md#patch_service_cidr) | **PATCH** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} |
+*NetworkingV1beta1Api* | [**patch_service_cidr_status**](docs/NetworkingV1beta1Api.md#patch_service_cidr_status) | **PATCH** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status |
+*NetworkingV1beta1Api* | [**read_ip_address**](docs/NetworkingV1beta1Api.md#read_ip_address) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} |
+*NetworkingV1beta1Api* | [**read_service_cidr**](docs/NetworkingV1beta1Api.md#read_service_cidr) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} |
+*NetworkingV1beta1Api* | [**read_service_cidr_status**](docs/NetworkingV1beta1Api.md#read_service_cidr_status) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status |
+*NetworkingV1beta1Api* | [**replace_ip_address**](docs/NetworkingV1beta1Api.md#replace_ip_address) | **PUT** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} |
+*NetworkingV1beta1Api* | [**replace_service_cidr**](docs/NetworkingV1beta1Api.md#replace_service_cidr) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} |
+*NetworkingV1beta1Api* | [**replace_service_cidr_status**](docs/NetworkingV1beta1Api.md#replace_service_cidr_status) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status |
+*NodeApi* | [**get_api_group**](docs/NodeApi.md#get_api_group) | **GET** /apis/node.k8s.io/ |
+*NodeV1Api* | [**create_runtime_class**](docs/NodeV1Api.md#create_runtime_class) | **POST** /apis/node.k8s.io/v1/runtimeclasses |
+*NodeV1Api* | [**delete_collection_runtime_class**](docs/NodeV1Api.md#delete_collection_runtime_class) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses |
+*NodeV1Api* | [**delete_runtime_class**](docs/NodeV1Api.md#delete_runtime_class) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses/{name} |
+*NodeV1Api* | [**get_api_resources**](docs/NodeV1Api.md#get_api_resources) | **GET** /apis/node.k8s.io/v1/ |
+*NodeV1Api* | [**list_runtime_class**](docs/NodeV1Api.md#list_runtime_class) | **GET** /apis/node.k8s.io/v1/runtimeclasses |
+*NodeV1Api* | [**patch_runtime_class**](docs/NodeV1Api.md#patch_runtime_class) | **PATCH** /apis/node.k8s.io/v1/runtimeclasses/{name} |
+*NodeV1Api* | [**read_runtime_class**](docs/NodeV1Api.md#read_runtime_class) | **GET** /apis/node.k8s.io/v1/runtimeclasses/{name} |
+*NodeV1Api* | [**replace_runtime_class**](docs/NodeV1Api.md#replace_runtime_class) | **PUT** /apis/node.k8s.io/v1/runtimeclasses/{name} |
+*OpenidApi* | [**get_service_account_issuer_open_id_keyset**](docs/OpenidApi.md#get_service_account_issuer_open_id_keyset) | **GET** /openid/v1/jwks |
+*PolicyApi* | [**get_api_group**](docs/PolicyApi.md#get_api_group) | **GET** /apis/policy/ |
+*PolicyV1Api* | [**create_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#create_namespaced_pod_disruption_budget) | **POST** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets |
+*PolicyV1Api* | [**delete_collection_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#delete_collection_namespaced_pod_disruption_budget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets |
+*PolicyV1Api* | [**delete_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#delete_namespaced_pod_disruption_budget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} |
+*PolicyV1Api* | [**get_api_resources**](docs/PolicyV1Api.md#get_api_resources) | **GET** /apis/policy/v1/ |
+*PolicyV1Api* | [**list_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#list_namespaced_pod_disruption_budget) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets |
+*PolicyV1Api* | [**list_pod_disruption_budget_for_all_namespaces**](docs/PolicyV1Api.md#list_pod_disruption_budget_for_all_namespaces) | **GET** /apis/policy/v1/poddisruptionbudgets |
+*PolicyV1Api* | [**patch_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#patch_namespaced_pod_disruption_budget) | **PATCH** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} |
+*PolicyV1Api* | [**patch_namespaced_pod_disruption_budget_status**](docs/PolicyV1Api.md#patch_namespaced_pod_disruption_budget_status) | **PATCH** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status |
+*PolicyV1Api* | [**read_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#read_namespaced_pod_disruption_budget) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} |
+*PolicyV1Api* | [**read_namespaced_pod_disruption_budget_status**](docs/PolicyV1Api.md#read_namespaced_pod_disruption_budget_status) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status |
+*PolicyV1Api* | [**replace_namespaced_pod_disruption_budget**](docs/PolicyV1Api.md#replace_namespaced_pod_disruption_budget) | **PUT** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} |
+*PolicyV1Api* | [**replace_namespaced_pod_disruption_budget_status**](docs/PolicyV1Api.md#replace_namespaced_pod_disruption_budget_status) | **PUT** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status |
+*RbacAuthorizationApi* | [**get_api_group**](docs/RbacAuthorizationApi.md#get_api_group) | **GET** /apis/rbac.authorization.k8s.io/ |
+*RbacAuthorizationV1Api* | [**create_cluster_role**](docs/RbacAuthorizationV1Api.md#create_cluster_role) | **POST** /apis/rbac.authorization.k8s.io/v1/clusterroles |
+*RbacAuthorizationV1Api* | [**create_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#create_cluster_role_binding) | **POST** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings |
+*RbacAuthorizationV1Api* | [**create_namespaced_role**](docs/RbacAuthorizationV1Api.md#create_namespaced_role) | **POST** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles |
+*RbacAuthorizationV1Api* | [**create_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#create_namespaced_role_binding) | **POST** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings |
+*RbacAuthorizationV1Api* | [**delete_cluster_role**](docs/RbacAuthorizationV1Api.md#delete_cluster_role) | **DELETE** /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} |
+*RbacAuthorizationV1Api* | [**delete_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#delete_cluster_role_binding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} |
+*RbacAuthorizationV1Api* | [**delete_collection_cluster_role**](docs/RbacAuthorizationV1Api.md#delete_collection_cluster_role) | **DELETE** /apis/rbac.authorization.k8s.io/v1/clusterroles |
+*RbacAuthorizationV1Api* | [**delete_collection_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#delete_collection_cluster_role_binding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings |
+*RbacAuthorizationV1Api* | [**delete_collection_namespaced_role**](docs/RbacAuthorizationV1Api.md#delete_collection_namespaced_role) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles |
+*RbacAuthorizationV1Api* | [**delete_collection_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#delete_collection_namespaced_role_binding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings |
+*RbacAuthorizationV1Api* | [**delete_namespaced_role**](docs/RbacAuthorizationV1Api.md#delete_namespaced_role) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} |
+*RbacAuthorizationV1Api* | [**delete_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#delete_namespaced_role_binding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} |
+*RbacAuthorizationV1Api* | [**get_api_resources**](docs/RbacAuthorizationV1Api.md#get_api_resources) | **GET** /apis/rbac.authorization.k8s.io/v1/ |
+*RbacAuthorizationV1Api* | [**list_cluster_role**](docs/RbacAuthorizationV1Api.md#list_cluster_role) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterroles |
+*RbacAuthorizationV1Api* | [**list_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#list_cluster_role_binding) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings |
+*RbacAuthorizationV1Api* | [**list_namespaced_role**](docs/RbacAuthorizationV1Api.md#list_namespaced_role) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles |
+*RbacAuthorizationV1Api* | [**list_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#list_namespaced_role_binding) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings |
+*RbacAuthorizationV1Api* | [**list_role_binding_for_all_namespaces**](docs/RbacAuthorizationV1Api.md#list_role_binding_for_all_namespaces) | **GET** /apis/rbac.authorization.k8s.io/v1/rolebindings |
+*RbacAuthorizationV1Api* | [**list_role_for_all_namespaces**](docs/RbacAuthorizationV1Api.md#list_role_for_all_namespaces) | **GET** /apis/rbac.authorization.k8s.io/v1/roles |
+*RbacAuthorizationV1Api* | [**patch_cluster_role**](docs/RbacAuthorizationV1Api.md#patch_cluster_role) | **PATCH** /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} |
+*RbacAuthorizationV1Api* | [**patch_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#patch_cluster_role_binding) | **PATCH** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} |
+*RbacAuthorizationV1Api* | [**patch_namespaced_role**](docs/RbacAuthorizationV1Api.md#patch_namespaced_role) | **PATCH** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} |
+*RbacAuthorizationV1Api* | [**patch_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#patch_namespaced_role_binding) | **PATCH** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} |
+*RbacAuthorizationV1Api* | [**read_cluster_role**](docs/RbacAuthorizationV1Api.md#read_cluster_role) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} |
+*RbacAuthorizationV1Api* | [**read_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#read_cluster_role_binding) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} |
+*RbacAuthorizationV1Api* | [**read_namespaced_role**](docs/RbacAuthorizationV1Api.md#read_namespaced_role) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} |
+*RbacAuthorizationV1Api* | [**read_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#read_namespaced_role_binding) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} |
+*RbacAuthorizationV1Api* | [**replace_cluster_role**](docs/RbacAuthorizationV1Api.md#replace_cluster_role) | **PUT** /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} |
+*RbacAuthorizationV1Api* | [**replace_cluster_role_binding**](docs/RbacAuthorizationV1Api.md#replace_cluster_role_binding) | **PUT** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} |
+*RbacAuthorizationV1Api* | [**replace_namespaced_role**](docs/RbacAuthorizationV1Api.md#replace_namespaced_role) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} |
+*RbacAuthorizationV1Api* | [**replace_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#replace_namespaced_role_binding) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} |
+*ResourceApi* | [**get_api_group**](docs/ResourceApi.md#get_api_group) | **GET** /apis/resource.k8s.io/ |
+*ResourceV1Api* | [**create_device_class**](docs/ResourceV1Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1/deviceclasses |
+*ResourceV1Api* | [**create_namespaced_resource_claim**](docs/ResourceV1Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims |
+*ResourceV1Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1Api* | [**create_resource_slice**](docs/ResourceV1Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1/resourceslices |
+*ResourceV1Api* | [**delete_collection_device_class**](docs/ResourceV1Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1/deviceclasses |
+*ResourceV1Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims |
+*ResourceV1Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1Api* | [**delete_collection_resource_slice**](docs/ResourceV1Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1/resourceslices |
+*ResourceV1Api* | [**delete_device_class**](docs/ResourceV1Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1/deviceclasses/{name} |
+*ResourceV1Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1Api* | [**delete_resource_slice**](docs/ResourceV1Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1/resourceslices/{name} |
+*ResourceV1Api* | [**get_api_resources**](docs/ResourceV1Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1/ |
+*ResourceV1Api* | [**list_device_class**](docs/ResourceV1Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1/deviceclasses |
+*ResourceV1Api* | [**list_namespaced_resource_claim**](docs/ResourceV1Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims |
+*ResourceV1Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1/resourceclaims |
+*ResourceV1Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1/resourceclaimtemplates |
+*ResourceV1Api* | [**list_resource_slice**](docs/ResourceV1Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1/resourceslices |
+*ResourceV1Api* | [**patch_device_class**](docs/ResourceV1Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1/deviceclasses/{name} |
+*ResourceV1Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1Api* | [**patch_resource_slice**](docs/ResourceV1Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1/resourceslices/{name} |
+*ResourceV1Api* | [**read_device_class**](docs/ResourceV1Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1/deviceclasses/{name} |
+*ResourceV1Api* | [**read_namespaced_resource_claim**](docs/ResourceV1Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1Api* | [**read_resource_slice**](docs/ResourceV1Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1/resourceslices/{name} |
+*ResourceV1Api* | [**replace_device_class**](docs/ResourceV1Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1/deviceclasses/{name} |
+*ResourceV1Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1Api* | [**replace_resource_slice**](docs/ResourceV1Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1/resourceslices/{name} |
+*ResourceV1alpha3Api* | [**create_device_taint_rule**](docs/ResourceV1alpha3Api.md#create_device_taint_rule) | **POST** /apis/resource.k8s.io/v1alpha3/devicetaintrules |
+*ResourceV1alpha3Api* | [**delete_collection_device_taint_rule**](docs/ResourceV1alpha3Api.md#delete_collection_device_taint_rule) | **DELETE** /apis/resource.k8s.io/v1alpha3/devicetaintrules |
+*ResourceV1alpha3Api* | [**delete_device_taint_rule**](docs/ResourceV1alpha3Api.md#delete_device_taint_rule) | **DELETE** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} |
+*ResourceV1alpha3Api* | [**get_api_resources**](docs/ResourceV1alpha3Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1alpha3/ |
+*ResourceV1alpha3Api* | [**list_device_taint_rule**](docs/ResourceV1alpha3Api.md#list_device_taint_rule) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules |
+*ResourceV1alpha3Api* | [**patch_device_taint_rule**](docs/ResourceV1alpha3Api.md#patch_device_taint_rule) | **PATCH** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} |
+*ResourceV1alpha3Api* | [**patch_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#patch_device_taint_rule_status) | **PATCH** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status |
+*ResourceV1alpha3Api* | [**read_device_taint_rule**](docs/ResourceV1alpha3Api.md#read_device_taint_rule) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} |
+*ResourceV1alpha3Api* | [**read_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#read_device_taint_rule_status) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status |
+*ResourceV1alpha3Api* | [**replace_device_taint_rule**](docs/ResourceV1alpha3Api.md#replace_device_taint_rule) | **PUT** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} |
+*ResourceV1alpha3Api* | [**replace_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#replace_device_taint_rule_status) | **PUT** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status |
+*ResourceV1beta1Api* | [**create_device_class**](docs/ResourceV1beta1Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1beta1/deviceclasses |
+*ResourceV1beta1Api* | [**create_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta1Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta1Api* | [**create_resource_slice**](docs/ResourceV1beta1Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1beta1/resourceslices |
+*ResourceV1beta1Api* | [**delete_collection_device_class**](docs/ResourceV1beta1Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses |
+*ResourceV1beta1Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta1Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta1Api* | [**delete_collection_resource_slice**](docs/ResourceV1beta1Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices |
+*ResourceV1beta1Api* | [**delete_device_class**](docs/ResourceV1beta1Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} |
+*ResourceV1beta1Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta1Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta1Api* | [**delete_resource_slice**](docs/ResourceV1beta1Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices/{name} |
+*ResourceV1beta1Api* | [**get_api_resources**](docs/ResourceV1beta1Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1beta1/ |
+*ResourceV1beta1Api* | [**list_device_class**](docs/ResourceV1beta1Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses |
+*ResourceV1beta1Api* | [**list_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta1Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta1Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1beta1Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaims |
+*ResourceV1beta1Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1beta1Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaimtemplates |
+*ResourceV1beta1Api* | [**list_resource_slice**](docs/ResourceV1beta1Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices |
+*ResourceV1beta1Api* | [**patch_device_class**](docs/ResourceV1beta1Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} |
+*ResourceV1beta1Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta1Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta1Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta1Api* | [**patch_resource_slice**](docs/ResourceV1beta1Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1beta1/resourceslices/{name} |
+*ResourceV1beta1Api* | [**read_device_class**](docs/ResourceV1beta1Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} |
+*ResourceV1beta1Api* | [**read_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta1Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta1Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta1Api* | [**read_resource_slice**](docs/ResourceV1beta1Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices/{name} |
+*ResourceV1beta1Api* | [**replace_device_class**](docs/ResourceV1beta1Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} |
+*ResourceV1beta1Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta1Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta1Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta1Api* | [**replace_resource_slice**](docs/ResourceV1beta1Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1beta1/resourceslices/{name} |
+*ResourceV1beta2Api* | [**create_device_class**](docs/ResourceV1beta2Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1beta2/deviceclasses |
+*ResourceV1beta2Api* | [**create_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta2Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta2Api* | [**create_resource_slice**](docs/ResourceV1beta2Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1beta2/resourceslices |
+*ResourceV1beta2Api* | [**delete_collection_device_class**](docs/ResourceV1beta2Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1beta2/deviceclasses |
+*ResourceV1beta2Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta2Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta2Api* | [**delete_collection_resource_slice**](docs/ResourceV1beta2Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta2/resourceslices |
+*ResourceV1beta2Api* | [**delete_device_class**](docs/ResourceV1beta2Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} |
+*ResourceV1beta2Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta2Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta2Api* | [**delete_resource_slice**](docs/ResourceV1beta2Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta2/resourceslices/{name} |
+*ResourceV1beta2Api* | [**get_api_resources**](docs/ResourceV1beta2Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1beta2/ |
+*ResourceV1beta2Api* | [**list_device_class**](docs/ResourceV1beta2Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1beta2/deviceclasses |
+*ResourceV1beta2Api* | [**list_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims |
+*ResourceV1beta2Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates |
+*ResourceV1beta2Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1beta2Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta2/resourceclaims |
+*ResourceV1beta2Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1beta2Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta2/resourceclaimtemplates |
+*ResourceV1beta2Api* | [**list_resource_slice**](docs/ResourceV1beta2Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1beta2/resourceslices |
+*ResourceV1beta2Api* | [**patch_device_class**](docs/ResourceV1beta2Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} |
+*ResourceV1beta2Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta2Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta2Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta2Api* | [**patch_resource_slice**](docs/ResourceV1beta2Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1beta2/resourceslices/{name} |
+*ResourceV1beta2Api* | [**read_device_class**](docs/ResourceV1beta2Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} |
+*ResourceV1beta2Api* | [**read_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta2Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta2Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta2Api* | [**read_resource_slice**](docs/ResourceV1beta2Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1beta2/resourceslices/{name} |
+*ResourceV1beta2Api* | [**replace_device_class**](docs/ResourceV1beta2Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} |
+*ResourceV1beta2Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} |
+*ResourceV1beta2Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status |
+*ResourceV1beta2Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} |
+*ResourceV1beta2Api* | [**replace_resource_slice**](docs/ResourceV1beta2Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1beta2/resourceslices/{name} |
+*SchedulingApi* | [**get_api_group**](docs/SchedulingApi.md#get_api_group) | **GET** /apis/scheduling.k8s.io/ |
+*SchedulingV1Api* | [**create_priority_class**](docs/SchedulingV1Api.md#create_priority_class) | **POST** /apis/scheduling.k8s.io/v1/priorityclasses |
+*SchedulingV1Api* | [**delete_collection_priority_class**](docs/SchedulingV1Api.md#delete_collection_priority_class) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses |
+*SchedulingV1Api* | [**delete_priority_class**](docs/SchedulingV1Api.md#delete_priority_class) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses/{name} |
+*SchedulingV1Api* | [**get_api_resources**](docs/SchedulingV1Api.md#get_api_resources) | **GET** /apis/scheduling.k8s.io/v1/ |
+*SchedulingV1Api* | [**list_priority_class**](docs/SchedulingV1Api.md#list_priority_class) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses |
+*SchedulingV1Api* | [**patch_priority_class**](docs/SchedulingV1Api.md#patch_priority_class) | **PATCH** /apis/scheduling.k8s.io/v1/priorityclasses/{name} |
+*SchedulingV1Api* | [**read_priority_class**](docs/SchedulingV1Api.md#read_priority_class) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses/{name} |
+*SchedulingV1Api* | [**replace_priority_class**](docs/SchedulingV1Api.md#replace_priority_class) | **PUT** /apis/scheduling.k8s.io/v1/priorityclasses/{name} |
+*SchedulingV1alpha1Api* | [**create_namespaced_workload**](docs/SchedulingV1alpha1Api.md#create_namespaced_workload) | **POST** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads |
+*SchedulingV1alpha1Api* | [**delete_collection_namespaced_workload**](docs/SchedulingV1alpha1Api.md#delete_collection_namespaced_workload) | **DELETE** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads |
+*SchedulingV1alpha1Api* | [**delete_namespaced_workload**](docs/SchedulingV1alpha1Api.md#delete_namespaced_workload) | **DELETE** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} |
+*SchedulingV1alpha1Api* | [**get_api_resources**](docs/SchedulingV1alpha1Api.md#get_api_resources) | **GET** /apis/scheduling.k8s.io/v1alpha1/ |
+*SchedulingV1alpha1Api* | [**list_namespaced_workload**](docs/SchedulingV1alpha1Api.md#list_namespaced_workload) | **GET** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads |
+*SchedulingV1alpha1Api* | [**list_workload_for_all_namespaces**](docs/SchedulingV1alpha1Api.md#list_workload_for_all_namespaces) | **GET** /apis/scheduling.k8s.io/v1alpha1/workloads |
+*SchedulingV1alpha1Api* | [**patch_namespaced_workload**](docs/SchedulingV1alpha1Api.md#patch_namespaced_workload) | **PATCH** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} |
+*SchedulingV1alpha1Api* | [**read_namespaced_workload**](docs/SchedulingV1alpha1Api.md#read_namespaced_workload) | **GET** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} |
+*SchedulingV1alpha1Api* | [**replace_namespaced_workload**](docs/SchedulingV1alpha1Api.md#replace_namespaced_workload) | **PUT** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} |
+*StorageApi* | [**get_api_group**](docs/StorageApi.md#get_api_group) | **GET** /apis/storage.k8s.io/ |
+*StorageV1Api* | [**create_csi_driver**](docs/StorageV1Api.md#create_csi_driver) | **POST** /apis/storage.k8s.io/v1/csidrivers |
+*StorageV1Api* | [**create_csi_node**](docs/StorageV1Api.md#create_csi_node) | **POST** /apis/storage.k8s.io/v1/csinodes |
+*StorageV1Api* | [**create_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#create_namespaced_csi_storage_capacity) | **POST** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities |
+*StorageV1Api* | [**create_storage_class**](docs/StorageV1Api.md#create_storage_class) | **POST** /apis/storage.k8s.io/v1/storageclasses |
+*StorageV1Api* | [**create_volume_attachment**](docs/StorageV1Api.md#create_volume_attachment) | **POST** /apis/storage.k8s.io/v1/volumeattachments |
+*StorageV1Api* | [**create_volume_attributes_class**](docs/StorageV1Api.md#create_volume_attributes_class) | **POST** /apis/storage.k8s.io/v1/volumeattributesclasses |
+*StorageV1Api* | [**delete_collection_csi_driver**](docs/StorageV1Api.md#delete_collection_csi_driver) | **DELETE** /apis/storage.k8s.io/v1/csidrivers |
+*StorageV1Api* | [**delete_collection_csi_node**](docs/StorageV1Api.md#delete_collection_csi_node) | **DELETE** /apis/storage.k8s.io/v1/csinodes |
+*StorageV1Api* | [**delete_collection_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#delete_collection_namespaced_csi_storage_capacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities |
+*StorageV1Api* | [**delete_collection_storage_class**](docs/StorageV1Api.md#delete_collection_storage_class) | **DELETE** /apis/storage.k8s.io/v1/storageclasses |
+*StorageV1Api* | [**delete_collection_volume_attachment**](docs/StorageV1Api.md#delete_collection_volume_attachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments |
+*StorageV1Api* | [**delete_collection_volume_attributes_class**](docs/StorageV1Api.md#delete_collection_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1/volumeattributesclasses |
+*StorageV1Api* | [**delete_csi_driver**](docs/StorageV1Api.md#delete_csi_driver) | **DELETE** /apis/storage.k8s.io/v1/csidrivers/{name} |
+*StorageV1Api* | [**delete_csi_node**](docs/StorageV1Api.md#delete_csi_node) | **DELETE** /apis/storage.k8s.io/v1/csinodes/{name} |
+*StorageV1Api* | [**delete_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#delete_namespaced_csi_storage_capacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} |
+*StorageV1Api* | [**delete_storage_class**](docs/StorageV1Api.md#delete_storage_class) | **DELETE** /apis/storage.k8s.io/v1/storageclasses/{name} |
+*StorageV1Api* | [**delete_volume_attachment**](docs/StorageV1Api.md#delete_volume_attachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments/{name} |
+*StorageV1Api* | [**delete_volume_attributes_class**](docs/StorageV1Api.md#delete_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} |
+*StorageV1Api* | [**get_api_resources**](docs/StorageV1Api.md#get_api_resources) | **GET** /apis/storage.k8s.io/v1/ |
+*StorageV1Api* | [**list_csi_driver**](docs/StorageV1Api.md#list_csi_driver) | **GET** /apis/storage.k8s.io/v1/csidrivers |
+*StorageV1Api* | [**list_csi_node**](docs/StorageV1Api.md#list_csi_node) | **GET** /apis/storage.k8s.io/v1/csinodes |
+*StorageV1Api* | [**list_csi_storage_capacity_for_all_namespaces**](docs/StorageV1Api.md#list_csi_storage_capacity_for_all_namespaces) | **GET** /apis/storage.k8s.io/v1/csistoragecapacities |
+*StorageV1Api* | [**list_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#list_namespaced_csi_storage_capacity) | **GET** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities |
+*StorageV1Api* | [**list_storage_class**](docs/StorageV1Api.md#list_storage_class) | **GET** /apis/storage.k8s.io/v1/storageclasses |
+*StorageV1Api* | [**list_volume_attachment**](docs/StorageV1Api.md#list_volume_attachment) | **GET** /apis/storage.k8s.io/v1/volumeattachments |
+*StorageV1Api* | [**list_volume_attributes_class**](docs/StorageV1Api.md#list_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1/volumeattributesclasses |
+*StorageV1Api* | [**patch_csi_driver**](docs/StorageV1Api.md#patch_csi_driver) | **PATCH** /apis/storage.k8s.io/v1/csidrivers/{name} |
+*StorageV1Api* | [**patch_csi_node**](docs/StorageV1Api.md#patch_csi_node) | **PATCH** /apis/storage.k8s.io/v1/csinodes/{name} |
+*StorageV1Api* | [**patch_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#patch_namespaced_csi_storage_capacity) | **PATCH** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} |
+*StorageV1Api* | [**patch_storage_class**](docs/StorageV1Api.md#patch_storage_class) | **PATCH** /apis/storage.k8s.io/v1/storageclasses/{name} |
+*StorageV1Api* | [**patch_volume_attachment**](docs/StorageV1Api.md#patch_volume_attachment) | **PATCH** /apis/storage.k8s.io/v1/volumeattachments/{name} |
+*StorageV1Api* | [**patch_volume_attachment_status**](docs/StorageV1Api.md#patch_volume_attachment_status) | **PATCH** /apis/storage.k8s.io/v1/volumeattachments/{name}/status |
+*StorageV1Api* | [**patch_volume_attributes_class**](docs/StorageV1Api.md#patch_volume_attributes_class) | **PATCH** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} |
+*StorageV1Api* | [**read_csi_driver**](docs/StorageV1Api.md#read_csi_driver) | **GET** /apis/storage.k8s.io/v1/csidrivers/{name} |
+*StorageV1Api* | [**read_csi_node**](docs/StorageV1Api.md#read_csi_node) | **GET** /apis/storage.k8s.io/v1/csinodes/{name} |
+*StorageV1Api* | [**read_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#read_namespaced_csi_storage_capacity) | **GET** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} |
+*StorageV1Api* | [**read_storage_class**](docs/StorageV1Api.md#read_storage_class) | **GET** /apis/storage.k8s.io/v1/storageclasses/{name} |
+*StorageV1Api* | [**read_volume_attachment**](docs/StorageV1Api.md#read_volume_attachment) | **GET** /apis/storage.k8s.io/v1/volumeattachments/{name} |
+*StorageV1Api* | [**read_volume_attachment_status**](docs/StorageV1Api.md#read_volume_attachment_status) | **GET** /apis/storage.k8s.io/v1/volumeattachments/{name}/status |
+*StorageV1Api* | [**read_volume_attributes_class**](docs/StorageV1Api.md#read_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} |
+*StorageV1Api* | [**replace_csi_driver**](docs/StorageV1Api.md#replace_csi_driver) | **PUT** /apis/storage.k8s.io/v1/csidrivers/{name} |
+*StorageV1Api* | [**replace_csi_node**](docs/StorageV1Api.md#replace_csi_node) | **PUT** /apis/storage.k8s.io/v1/csinodes/{name} |
+*StorageV1Api* | [**replace_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#replace_namespaced_csi_storage_capacity) | **PUT** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} |
+*StorageV1Api* | [**replace_storage_class**](docs/StorageV1Api.md#replace_storage_class) | **PUT** /apis/storage.k8s.io/v1/storageclasses/{name} |
+*StorageV1Api* | [**replace_volume_attachment**](docs/StorageV1Api.md#replace_volume_attachment) | **PUT** /apis/storage.k8s.io/v1/volumeattachments/{name} |
+*StorageV1Api* | [**replace_volume_attachment_status**](docs/StorageV1Api.md#replace_volume_attachment_status) | **PUT** /apis/storage.k8s.io/v1/volumeattachments/{name}/status |
+*StorageV1Api* | [**replace_volume_attributes_class**](docs/StorageV1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} |
+*StorageV1beta1Api* | [**create_volume_attributes_class**](docs/StorageV1beta1Api.md#create_volume_attributes_class) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses |
+*StorageV1beta1Api* | [**delete_collection_volume_attributes_class**](docs/StorageV1beta1Api.md#delete_collection_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses |
+*StorageV1beta1Api* | [**delete_volume_attributes_class**](docs/StorageV1beta1Api.md#delete_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} |
+*StorageV1beta1Api* | [**get_api_resources**](docs/StorageV1beta1Api.md#get_api_resources) | **GET** /apis/storage.k8s.io/v1beta1/ |
+*StorageV1beta1Api* | [**list_volume_attributes_class**](docs/StorageV1beta1Api.md#list_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses |
+*StorageV1beta1Api* | [**patch_volume_attributes_class**](docs/StorageV1beta1Api.md#patch_volume_attributes_class) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} |
+*StorageV1beta1Api* | [**read_volume_attributes_class**](docs/StorageV1beta1Api.md#read_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} |
+*StorageV1beta1Api* | [**replace_volume_attributes_class**](docs/StorageV1beta1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} |
+*StoragemigrationApi* | [**get_api_group**](docs/StoragemigrationApi.md#get_api_group) | **GET** /apis/storagemigration.k8s.io/ |
+*StoragemigrationV1beta1Api* | [**create_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#create_storage_version_migration) | **POST** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations |
+*StoragemigrationV1beta1Api* | [**delete_collection_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#delete_collection_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations |
+*StoragemigrationV1beta1Api* | [**delete_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#delete_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} |
+*StoragemigrationV1beta1Api* | [**get_api_resources**](docs/StoragemigrationV1beta1Api.md#get_api_resources) | **GET** /apis/storagemigration.k8s.io/v1beta1/ |
+*StoragemigrationV1beta1Api* | [**list_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#list_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations |
+*StoragemigrationV1beta1Api* | [**patch_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#patch_storage_version_migration) | **PATCH** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} |
+*StoragemigrationV1beta1Api* | [**patch_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#patch_storage_version_migration_status) | **PATCH** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status |
+*StoragemigrationV1beta1Api* | [**read_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#read_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} |
+*StoragemigrationV1beta1Api* | [**read_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#read_storage_version_migration_status) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status |
+*StoragemigrationV1beta1Api* | [**replace_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#replace_storage_version_migration) | **PUT** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} |
+*StoragemigrationV1beta1Api* | [**replace_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#replace_storage_version_migration_status) | **PUT** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status |
+*VersionApi* | [**get_code**](docs/VersionApi.md#get_code) | **GET** /version/ |
+
+
+## Documentation For Models
+
+ - [AdmissionregistrationV1ServiceReference](docs/AdmissionregistrationV1ServiceReference.md)
+ - [AdmissionregistrationV1WebhookClientConfig](docs/AdmissionregistrationV1WebhookClientConfig.md)
+ - [ApiextensionsV1ServiceReference](docs/ApiextensionsV1ServiceReference.md)
+ - [ApiextensionsV1WebhookClientConfig](docs/ApiextensionsV1WebhookClientConfig.md)
+ - [ApiregistrationV1ServiceReference](docs/ApiregistrationV1ServiceReference.md)
+ - [AuthenticationV1TokenRequest](docs/AuthenticationV1TokenRequest.md)
+ - [CoreV1EndpointPort](docs/CoreV1EndpointPort.md)
+ - [CoreV1Event](docs/CoreV1Event.md)
+ - [CoreV1EventList](docs/CoreV1EventList.md)
+ - [CoreV1EventSeries](docs/CoreV1EventSeries.md)
+ - [CoreV1ResourceClaim](docs/CoreV1ResourceClaim.md)
+ - [DiscoveryV1EndpointPort](docs/DiscoveryV1EndpointPort.md)
+ - [EventsV1Event](docs/EventsV1Event.md)
+ - [EventsV1EventList](docs/EventsV1EventList.md)
+ - [EventsV1EventSeries](docs/EventsV1EventSeries.md)
+ - [FlowcontrolV1Subject](docs/FlowcontrolV1Subject.md)
+ - [RbacV1Subject](docs/RbacV1Subject.md)
+ - [ResourceV1ResourceClaim](docs/ResourceV1ResourceClaim.md)
+ - [StorageV1TokenRequest](docs/StorageV1TokenRequest.md)
+ - [V1APIGroup](docs/V1APIGroup.md)
+ - [V1APIGroupList](docs/V1APIGroupList.md)
+ - [V1APIResource](docs/V1APIResource.md)
+ - [V1APIResourceList](docs/V1APIResourceList.md)
+ - [V1APIService](docs/V1APIService.md)
+ - [V1APIServiceCondition](docs/V1APIServiceCondition.md)
+ - [V1APIServiceList](docs/V1APIServiceList.md)
+ - [V1APIServiceSpec](docs/V1APIServiceSpec.md)
+ - [V1APIServiceStatus](docs/V1APIServiceStatus.md)
+ - [V1APIVersions](docs/V1APIVersions.md)
+ - [V1AWSElasticBlockStoreVolumeSource](docs/V1AWSElasticBlockStoreVolumeSource.md)
+ - [V1Affinity](docs/V1Affinity.md)
+ - [V1AggregationRule](docs/V1AggregationRule.md)
+ - [V1AllocatedDeviceStatus](docs/V1AllocatedDeviceStatus.md)
+ - [V1AllocationResult](docs/V1AllocationResult.md)
+ - [V1AppArmorProfile](docs/V1AppArmorProfile.md)
+ - [V1AttachedVolume](docs/V1AttachedVolume.md)
+ - [V1AuditAnnotation](docs/V1AuditAnnotation.md)
+ - [V1AzureDiskVolumeSource](docs/V1AzureDiskVolumeSource.md)
+ - [V1AzureFilePersistentVolumeSource](docs/V1AzureFilePersistentVolumeSource.md)
+ - [V1AzureFileVolumeSource](docs/V1AzureFileVolumeSource.md)
+ - [V1Binding](docs/V1Binding.md)
+ - [V1BoundObjectReference](docs/V1BoundObjectReference.md)
+ - [V1CELDeviceSelector](docs/V1CELDeviceSelector.md)
+ - [V1CSIDriver](docs/V1CSIDriver.md)
+ - [V1CSIDriverList](docs/V1CSIDriverList.md)
+ - [V1CSIDriverSpec](docs/V1CSIDriverSpec.md)
+ - [V1CSINode](docs/V1CSINode.md)
+ - [V1CSINodeDriver](docs/V1CSINodeDriver.md)
+ - [V1CSINodeList](docs/V1CSINodeList.md)
+ - [V1CSINodeSpec](docs/V1CSINodeSpec.md)
+ - [V1CSIPersistentVolumeSource](docs/V1CSIPersistentVolumeSource.md)
+ - [V1CSIStorageCapacity](docs/V1CSIStorageCapacity.md)
+ - [V1CSIStorageCapacityList](docs/V1CSIStorageCapacityList.md)
+ - [V1CSIVolumeSource](docs/V1CSIVolumeSource.md)
+ - [V1Capabilities](docs/V1Capabilities.md)
+ - [V1CapacityRequestPolicy](docs/V1CapacityRequestPolicy.md)
+ - [V1CapacityRequestPolicyRange](docs/V1CapacityRequestPolicyRange.md)
+ - [V1CapacityRequirements](docs/V1CapacityRequirements.md)
+ - [V1CephFSPersistentVolumeSource](docs/V1CephFSPersistentVolumeSource.md)
+ - [V1CephFSVolumeSource](docs/V1CephFSVolumeSource.md)
+ - [V1CertificateSigningRequest](docs/V1CertificateSigningRequest.md)
+ - [V1CertificateSigningRequestCondition](docs/V1CertificateSigningRequestCondition.md)
+ - [V1CertificateSigningRequestList](docs/V1CertificateSigningRequestList.md)
+ - [V1CertificateSigningRequestSpec](docs/V1CertificateSigningRequestSpec.md)
+ - [V1CertificateSigningRequestStatus](docs/V1CertificateSigningRequestStatus.md)
+ - [V1CinderPersistentVolumeSource](docs/V1CinderPersistentVolumeSource.md)
+ - [V1CinderVolumeSource](docs/V1CinderVolumeSource.md)
+ - [V1ClientIPConfig](docs/V1ClientIPConfig.md)
+ - [V1ClusterRole](docs/V1ClusterRole.md)
+ - [V1ClusterRoleBinding](docs/V1ClusterRoleBinding.md)
+ - [V1ClusterRoleBindingList](docs/V1ClusterRoleBindingList.md)
+ - [V1ClusterRoleList](docs/V1ClusterRoleList.md)
+ - [V1ClusterTrustBundleProjection](docs/V1ClusterTrustBundleProjection.md)
+ - [V1ComponentCondition](docs/V1ComponentCondition.md)
+ - [V1ComponentStatus](docs/V1ComponentStatus.md)
+ - [V1ComponentStatusList](docs/V1ComponentStatusList.md)
+ - [V1Condition](docs/V1Condition.md)
+ - [V1ConfigMap](docs/V1ConfigMap.md)
+ - [V1ConfigMapEnvSource](docs/V1ConfigMapEnvSource.md)
+ - [V1ConfigMapKeySelector](docs/V1ConfigMapKeySelector.md)
+ - [V1ConfigMapList](docs/V1ConfigMapList.md)
+ - [V1ConfigMapNodeConfigSource](docs/V1ConfigMapNodeConfigSource.md)
+ - [V1ConfigMapProjection](docs/V1ConfigMapProjection.md)
+ - [V1ConfigMapVolumeSource](docs/V1ConfigMapVolumeSource.md)
+ - [V1Container](docs/V1Container.md)
+ - [V1ContainerExtendedResourceRequest](docs/V1ContainerExtendedResourceRequest.md)
+ - [V1ContainerImage](docs/V1ContainerImage.md)
+ - [V1ContainerPort](docs/V1ContainerPort.md)
+ - [V1ContainerResizePolicy](docs/V1ContainerResizePolicy.md)
+ - [V1ContainerRestartRule](docs/V1ContainerRestartRule.md)
+ - [V1ContainerRestartRuleOnExitCodes](docs/V1ContainerRestartRuleOnExitCodes.md)
+ - [V1ContainerState](docs/V1ContainerState.md)
+ - [V1ContainerStateRunning](docs/V1ContainerStateRunning.md)
+ - [V1ContainerStateTerminated](docs/V1ContainerStateTerminated.md)
+ - [V1ContainerStateWaiting](docs/V1ContainerStateWaiting.md)
+ - [V1ContainerStatus](docs/V1ContainerStatus.md)
+ - [V1ContainerUser](docs/V1ContainerUser.md)
+ - [V1ControllerRevision](docs/V1ControllerRevision.md)
+ - [V1ControllerRevisionList](docs/V1ControllerRevisionList.md)
+ - [V1Counter](docs/V1Counter.md)
+ - [V1CounterSet](docs/V1CounterSet.md)
+ - [V1CronJob](docs/V1CronJob.md)
+ - [V1CronJobList](docs/V1CronJobList.md)
+ - [V1CronJobSpec](docs/V1CronJobSpec.md)
+ - [V1CronJobStatus](docs/V1CronJobStatus.md)
+ - [V1CrossVersionObjectReference](docs/V1CrossVersionObjectReference.md)
+ - [V1CustomResourceColumnDefinition](docs/V1CustomResourceColumnDefinition.md)
+ - [V1CustomResourceConversion](docs/V1CustomResourceConversion.md)
+ - [V1CustomResourceDefinition](docs/V1CustomResourceDefinition.md)
+ - [V1CustomResourceDefinitionCondition](docs/V1CustomResourceDefinitionCondition.md)
+ - [V1CustomResourceDefinitionList](docs/V1CustomResourceDefinitionList.md)
+ - [V1CustomResourceDefinitionNames](docs/V1CustomResourceDefinitionNames.md)
+ - [V1CustomResourceDefinitionSpec](docs/V1CustomResourceDefinitionSpec.md)
+ - [V1CustomResourceDefinitionStatus](docs/V1CustomResourceDefinitionStatus.md)
+ - [V1CustomResourceDefinitionVersion](docs/V1CustomResourceDefinitionVersion.md)
+ - [V1CustomResourceSubresourceScale](docs/V1CustomResourceSubresourceScale.md)
+ - [V1CustomResourceSubresources](docs/V1CustomResourceSubresources.md)
+ - [V1CustomResourceValidation](docs/V1CustomResourceValidation.md)
+ - [V1DaemonEndpoint](docs/V1DaemonEndpoint.md)
+ - [V1DaemonSet](docs/V1DaemonSet.md)
+ - [V1DaemonSetCondition](docs/V1DaemonSetCondition.md)
+ - [V1DaemonSetList](docs/V1DaemonSetList.md)
+ - [V1DaemonSetSpec](docs/V1DaemonSetSpec.md)
+ - [V1DaemonSetStatus](docs/V1DaemonSetStatus.md)
+ - [V1DaemonSetUpdateStrategy](docs/V1DaemonSetUpdateStrategy.md)
+ - [V1DeleteOptions](docs/V1DeleteOptions.md)
+ - [V1Deployment](docs/V1Deployment.md)
+ - [V1DeploymentCondition](docs/V1DeploymentCondition.md)
+ - [V1DeploymentList](docs/V1DeploymentList.md)
+ - [V1DeploymentSpec](docs/V1DeploymentSpec.md)
+ - [V1DeploymentStatus](docs/V1DeploymentStatus.md)
+ - [V1DeploymentStrategy](docs/V1DeploymentStrategy.md)
+ - [V1Device](docs/V1Device.md)
+ - [V1DeviceAllocationConfiguration](docs/V1DeviceAllocationConfiguration.md)
+ - [V1DeviceAllocationResult](docs/V1DeviceAllocationResult.md)
+ - [V1DeviceAttribute](docs/V1DeviceAttribute.md)
+ - [V1DeviceCapacity](docs/V1DeviceCapacity.md)
+ - [V1DeviceClaim](docs/V1DeviceClaim.md)
+ - [V1DeviceClaimConfiguration](docs/V1DeviceClaimConfiguration.md)
+ - [V1DeviceClass](docs/V1DeviceClass.md)
+ - [V1DeviceClassConfiguration](docs/V1DeviceClassConfiguration.md)
+ - [V1DeviceClassList](docs/V1DeviceClassList.md)
+ - [V1DeviceClassSpec](docs/V1DeviceClassSpec.md)
+ - [V1DeviceConstraint](docs/V1DeviceConstraint.md)
+ - [V1DeviceCounterConsumption](docs/V1DeviceCounterConsumption.md)
+ - [V1DeviceRequest](docs/V1DeviceRequest.md)
+ - [V1DeviceRequestAllocationResult](docs/V1DeviceRequestAllocationResult.md)
+ - [V1DeviceSelector](docs/V1DeviceSelector.md)
+ - [V1DeviceSubRequest](docs/V1DeviceSubRequest.md)
+ - [V1DeviceTaint](docs/V1DeviceTaint.md)
+ - [V1DeviceToleration](docs/V1DeviceToleration.md)
+ - [V1DownwardAPIProjection](docs/V1DownwardAPIProjection.md)
+ - [V1DownwardAPIVolumeFile](docs/V1DownwardAPIVolumeFile.md)
+ - [V1DownwardAPIVolumeSource](docs/V1DownwardAPIVolumeSource.md)
+ - [V1EmptyDirVolumeSource](docs/V1EmptyDirVolumeSource.md)
+ - [V1Endpoint](docs/V1Endpoint.md)
+ - [V1EndpointAddress](docs/V1EndpointAddress.md)
+ - [V1EndpointConditions](docs/V1EndpointConditions.md)
+ - [V1EndpointHints](docs/V1EndpointHints.md)
+ - [V1EndpointSlice](docs/V1EndpointSlice.md)
+ - [V1EndpointSliceList](docs/V1EndpointSliceList.md)
+ - [V1EndpointSubset](docs/V1EndpointSubset.md)
+ - [V1Endpoints](docs/V1Endpoints.md)
+ - [V1EndpointsList](docs/V1EndpointsList.md)
+ - [V1EnvFromSource](docs/V1EnvFromSource.md)
+ - [V1EnvVar](docs/V1EnvVar.md)
+ - [V1EnvVarSource](docs/V1EnvVarSource.md)
+ - [V1EphemeralContainer](docs/V1EphemeralContainer.md)
+ - [V1EphemeralVolumeSource](docs/V1EphemeralVolumeSource.md)
+ - [V1EventSource](docs/V1EventSource.md)
+ - [V1Eviction](docs/V1Eviction.md)
+ - [V1ExactDeviceRequest](docs/V1ExactDeviceRequest.md)
+ - [V1ExecAction](docs/V1ExecAction.md)
+ - [V1ExemptPriorityLevelConfiguration](docs/V1ExemptPriorityLevelConfiguration.md)
+ - [V1ExpressionWarning](docs/V1ExpressionWarning.md)
+ - [V1ExternalDocumentation](docs/V1ExternalDocumentation.md)
+ - [V1FCVolumeSource](docs/V1FCVolumeSource.md)
+ - [V1FieldSelectorAttributes](docs/V1FieldSelectorAttributes.md)
+ - [V1FieldSelectorRequirement](docs/V1FieldSelectorRequirement.md)
+ - [V1FileKeySelector](docs/V1FileKeySelector.md)
+ - [V1FlexPersistentVolumeSource](docs/V1FlexPersistentVolumeSource.md)
+ - [V1FlexVolumeSource](docs/V1FlexVolumeSource.md)
+ - [V1FlockerVolumeSource](docs/V1FlockerVolumeSource.md)
+ - [V1FlowDistinguisherMethod](docs/V1FlowDistinguisherMethod.md)
+ - [V1FlowSchema](docs/V1FlowSchema.md)
+ - [V1FlowSchemaCondition](docs/V1FlowSchemaCondition.md)
+ - [V1FlowSchemaList](docs/V1FlowSchemaList.md)
+ - [V1FlowSchemaSpec](docs/V1FlowSchemaSpec.md)
+ - [V1FlowSchemaStatus](docs/V1FlowSchemaStatus.md)
+ - [V1ForNode](docs/V1ForNode.md)
+ - [V1ForZone](docs/V1ForZone.md)
+ - [V1GCEPersistentDiskVolumeSource](docs/V1GCEPersistentDiskVolumeSource.md)
+ - [V1GRPCAction](docs/V1GRPCAction.md)
+ - [V1GitRepoVolumeSource](docs/V1GitRepoVolumeSource.md)
+ - [V1GlusterfsPersistentVolumeSource](docs/V1GlusterfsPersistentVolumeSource.md)
+ - [V1GlusterfsVolumeSource](docs/V1GlusterfsVolumeSource.md)
+ - [V1GroupResource](docs/V1GroupResource.md)
+ - [V1GroupSubject](docs/V1GroupSubject.md)
+ - [V1GroupVersionForDiscovery](docs/V1GroupVersionForDiscovery.md)
+ - [V1HTTPGetAction](docs/V1HTTPGetAction.md)
+ - [V1HTTPHeader](docs/V1HTTPHeader.md)
+ - [V1HTTPIngressPath](docs/V1HTTPIngressPath.md)
+ - [V1HTTPIngressRuleValue](docs/V1HTTPIngressRuleValue.md)
+ - [V1HorizontalPodAutoscaler](docs/V1HorizontalPodAutoscaler.md)
+ - [V1HorizontalPodAutoscalerList](docs/V1HorizontalPodAutoscalerList.md)
+ - [V1HorizontalPodAutoscalerSpec](docs/V1HorizontalPodAutoscalerSpec.md)
+ - [V1HorizontalPodAutoscalerStatus](docs/V1HorizontalPodAutoscalerStatus.md)
+ - [V1HostAlias](docs/V1HostAlias.md)
+ - [V1HostIP](docs/V1HostIP.md)
+ - [V1HostPathVolumeSource](docs/V1HostPathVolumeSource.md)
+ - [V1IPAddress](docs/V1IPAddress.md)
+ - [V1IPAddressList](docs/V1IPAddressList.md)
+ - [V1IPAddressSpec](docs/V1IPAddressSpec.md)
+ - [V1IPBlock](docs/V1IPBlock.md)
+ - [V1ISCSIPersistentVolumeSource](docs/V1ISCSIPersistentVolumeSource.md)
+ - [V1ISCSIVolumeSource](docs/V1ISCSIVolumeSource.md)
+ - [V1ImageVolumeSource](docs/V1ImageVolumeSource.md)
+ - [V1Ingress](docs/V1Ingress.md)
+ - [V1IngressBackend](docs/V1IngressBackend.md)
+ - [V1IngressClass](docs/V1IngressClass.md)
+ - [V1IngressClassList](docs/V1IngressClassList.md)
+ - [V1IngressClassParametersReference](docs/V1IngressClassParametersReference.md)
+ - [V1IngressClassSpec](docs/V1IngressClassSpec.md)
+ - [V1IngressList](docs/V1IngressList.md)
+ - [V1IngressLoadBalancerIngress](docs/V1IngressLoadBalancerIngress.md)
+ - [V1IngressLoadBalancerStatus](docs/V1IngressLoadBalancerStatus.md)
+ - [V1IngressPortStatus](docs/V1IngressPortStatus.md)
+ - [V1IngressRule](docs/V1IngressRule.md)
+ - [V1IngressServiceBackend](docs/V1IngressServiceBackend.md)
+ - [V1IngressSpec](docs/V1IngressSpec.md)
+ - [V1IngressStatus](docs/V1IngressStatus.md)
+ - [V1IngressTLS](docs/V1IngressTLS.md)
+ - [V1JSONSchemaProps](docs/V1JSONSchemaProps.md)
+ - [V1Job](docs/V1Job.md)
+ - [V1JobCondition](docs/V1JobCondition.md)
+ - [V1JobList](docs/V1JobList.md)
+ - [V1JobSpec](docs/V1JobSpec.md)
+ - [V1JobStatus](docs/V1JobStatus.md)
+ - [V1JobTemplateSpec](docs/V1JobTemplateSpec.md)
+ - [V1KeyToPath](docs/V1KeyToPath.md)
+ - [V1LabelSelector](docs/V1LabelSelector.md)
+ - [V1LabelSelectorAttributes](docs/V1LabelSelectorAttributes.md)
+ - [V1LabelSelectorRequirement](docs/V1LabelSelectorRequirement.md)
+ - [V1Lease](docs/V1Lease.md)
+ - [V1LeaseList](docs/V1LeaseList.md)
+ - [V1LeaseSpec](docs/V1LeaseSpec.md)
+ - [V1Lifecycle](docs/V1Lifecycle.md)
+ - [V1LifecycleHandler](docs/V1LifecycleHandler.md)
+ - [V1LimitRange](docs/V1LimitRange.md)
+ - [V1LimitRangeItem](docs/V1LimitRangeItem.md)
+ - [V1LimitRangeList](docs/V1LimitRangeList.md)
+ - [V1LimitRangeSpec](docs/V1LimitRangeSpec.md)
+ - [V1LimitResponse](docs/V1LimitResponse.md)
+ - [V1LimitedPriorityLevelConfiguration](docs/V1LimitedPriorityLevelConfiguration.md)
+ - [V1LinuxContainerUser](docs/V1LinuxContainerUser.md)
+ - [V1ListMeta](docs/V1ListMeta.md)
+ - [V1LoadBalancerIngress](docs/V1LoadBalancerIngress.md)
+ - [V1LoadBalancerStatus](docs/V1LoadBalancerStatus.md)
+ - [V1LocalObjectReference](docs/V1LocalObjectReference.md)
+ - [V1LocalSubjectAccessReview](docs/V1LocalSubjectAccessReview.md)
+ - [V1LocalVolumeSource](docs/V1LocalVolumeSource.md)
+ - [V1ManagedFieldsEntry](docs/V1ManagedFieldsEntry.md)
+ - [V1MatchCondition](docs/V1MatchCondition.md)
+ - [V1MatchResources](docs/V1MatchResources.md)
+ - [V1ModifyVolumeStatus](docs/V1ModifyVolumeStatus.md)
+ - [V1MutatingWebhook](docs/V1MutatingWebhook.md)
+ - [V1MutatingWebhookConfiguration](docs/V1MutatingWebhookConfiguration.md)
+ - [V1MutatingWebhookConfigurationList](docs/V1MutatingWebhookConfigurationList.md)
+ - [V1NFSVolumeSource](docs/V1NFSVolumeSource.md)
+ - [V1NamedRuleWithOperations](docs/V1NamedRuleWithOperations.md)
+ - [V1Namespace](docs/V1Namespace.md)
+ - [V1NamespaceCondition](docs/V1NamespaceCondition.md)
+ - [V1NamespaceList](docs/V1NamespaceList.md)
+ - [V1NamespaceSpec](docs/V1NamespaceSpec.md)
+ - [V1NamespaceStatus](docs/V1NamespaceStatus.md)
+ - [V1NetworkDeviceData](docs/V1NetworkDeviceData.md)
+ - [V1NetworkPolicy](docs/V1NetworkPolicy.md)
+ - [V1NetworkPolicyEgressRule](docs/V1NetworkPolicyEgressRule.md)
+ - [V1NetworkPolicyIngressRule](docs/V1NetworkPolicyIngressRule.md)
+ - [V1NetworkPolicyList](docs/V1NetworkPolicyList.md)
+ - [V1NetworkPolicyPeer](docs/V1NetworkPolicyPeer.md)
+ - [V1NetworkPolicyPort](docs/V1NetworkPolicyPort.md)
+ - [V1NetworkPolicySpec](docs/V1NetworkPolicySpec.md)
+ - [V1Node](docs/V1Node.md)
+ - [V1NodeAddress](docs/V1NodeAddress.md)
+ - [V1NodeAffinity](docs/V1NodeAffinity.md)
+ - [V1NodeCondition](docs/V1NodeCondition.md)
+ - [V1NodeConfigSource](docs/V1NodeConfigSource.md)
+ - [V1NodeConfigStatus](docs/V1NodeConfigStatus.md)
+ - [V1NodeDaemonEndpoints](docs/V1NodeDaemonEndpoints.md)
+ - [V1NodeFeatures](docs/V1NodeFeatures.md)
+ - [V1NodeList](docs/V1NodeList.md)
+ - [V1NodeRuntimeHandler](docs/V1NodeRuntimeHandler.md)
+ - [V1NodeRuntimeHandlerFeatures](docs/V1NodeRuntimeHandlerFeatures.md)
+ - [V1NodeSelector](docs/V1NodeSelector.md)
+ - [V1NodeSelectorRequirement](docs/V1NodeSelectorRequirement.md)
+ - [V1NodeSelectorTerm](docs/V1NodeSelectorTerm.md)
+ - [V1NodeSpec](docs/V1NodeSpec.md)
+ - [V1NodeStatus](docs/V1NodeStatus.md)
+ - [V1NodeSwapStatus](docs/V1NodeSwapStatus.md)
+ - [V1NodeSystemInfo](docs/V1NodeSystemInfo.md)
+ - [V1NonResourceAttributes](docs/V1NonResourceAttributes.md)
+ - [V1NonResourcePolicyRule](docs/V1NonResourcePolicyRule.md)
+ - [V1NonResourceRule](docs/V1NonResourceRule.md)
+ - [V1ObjectFieldSelector](docs/V1ObjectFieldSelector.md)
+ - [V1ObjectMeta](docs/V1ObjectMeta.md)
+ - [V1ObjectReference](docs/V1ObjectReference.md)
+ - [V1OpaqueDeviceConfiguration](docs/V1OpaqueDeviceConfiguration.md)
+ - [V1Overhead](docs/V1Overhead.md)
+ - [V1OwnerReference](docs/V1OwnerReference.md)
+ - [V1ParamKind](docs/V1ParamKind.md)
+ - [V1ParamRef](docs/V1ParamRef.md)
+ - [V1ParentReference](docs/V1ParentReference.md)
+ - [V1PersistentVolume](docs/V1PersistentVolume.md)
+ - [V1PersistentVolumeClaim](docs/V1PersistentVolumeClaim.md)
+ - [V1PersistentVolumeClaimCondition](docs/V1PersistentVolumeClaimCondition.md)
+ - [V1PersistentVolumeClaimList](docs/V1PersistentVolumeClaimList.md)
+ - [V1PersistentVolumeClaimSpec](docs/V1PersistentVolumeClaimSpec.md)
+ - [V1PersistentVolumeClaimStatus](docs/V1PersistentVolumeClaimStatus.md)
+ - [V1PersistentVolumeClaimTemplate](docs/V1PersistentVolumeClaimTemplate.md)
+ - [V1PersistentVolumeClaimVolumeSource](docs/V1PersistentVolumeClaimVolumeSource.md)
+ - [V1PersistentVolumeList](docs/V1PersistentVolumeList.md)
+ - [V1PersistentVolumeSpec](docs/V1PersistentVolumeSpec.md)
+ - [V1PersistentVolumeStatus](docs/V1PersistentVolumeStatus.md)
+ - [V1PhotonPersistentDiskVolumeSource](docs/V1PhotonPersistentDiskVolumeSource.md)
+ - [V1Pod](docs/V1Pod.md)
+ - [V1PodAffinity](docs/V1PodAffinity.md)
+ - [V1PodAffinityTerm](docs/V1PodAffinityTerm.md)
+ - [V1PodAntiAffinity](docs/V1PodAntiAffinity.md)
+ - [V1PodCertificateProjection](docs/V1PodCertificateProjection.md)
+ - [V1PodCondition](docs/V1PodCondition.md)
+ - [V1PodDNSConfig](docs/V1PodDNSConfig.md)
+ - [V1PodDNSConfigOption](docs/V1PodDNSConfigOption.md)
+ - [V1PodDisruptionBudget](docs/V1PodDisruptionBudget.md)
+ - [V1PodDisruptionBudgetList](docs/V1PodDisruptionBudgetList.md)
+ - [V1PodDisruptionBudgetSpec](docs/V1PodDisruptionBudgetSpec.md)
+ - [V1PodDisruptionBudgetStatus](docs/V1PodDisruptionBudgetStatus.md)
+ - [V1PodExtendedResourceClaimStatus](docs/V1PodExtendedResourceClaimStatus.md)
+ - [V1PodFailurePolicy](docs/V1PodFailurePolicy.md)
+ - [V1PodFailurePolicyOnExitCodesRequirement](docs/V1PodFailurePolicyOnExitCodesRequirement.md)
+ - [V1PodFailurePolicyOnPodConditionsPattern](docs/V1PodFailurePolicyOnPodConditionsPattern.md)
+ - [V1PodFailurePolicyRule](docs/V1PodFailurePolicyRule.md)
+ - [V1PodIP](docs/V1PodIP.md)
+ - [V1PodList](docs/V1PodList.md)
+ - [V1PodOS](docs/V1PodOS.md)
+ - [V1PodReadinessGate](docs/V1PodReadinessGate.md)
+ - [V1PodResourceClaim](docs/V1PodResourceClaim.md)
+ - [V1PodResourceClaimStatus](docs/V1PodResourceClaimStatus.md)
+ - [V1PodSchedulingGate](docs/V1PodSchedulingGate.md)
+ - [V1PodSecurityContext](docs/V1PodSecurityContext.md)
+ - [V1PodSpec](docs/V1PodSpec.md)
+ - [V1PodStatus](docs/V1PodStatus.md)
+ - [V1PodTemplate](docs/V1PodTemplate.md)
+ - [V1PodTemplateList](docs/V1PodTemplateList.md)
+ - [V1PodTemplateSpec](docs/V1PodTemplateSpec.md)
+ - [V1PolicyRule](docs/V1PolicyRule.md)
+ - [V1PolicyRulesWithSubjects](docs/V1PolicyRulesWithSubjects.md)
+ - [V1PortStatus](docs/V1PortStatus.md)
+ - [V1PortworxVolumeSource](docs/V1PortworxVolumeSource.md)
+ - [V1Preconditions](docs/V1Preconditions.md)
+ - [V1PreferredSchedulingTerm](docs/V1PreferredSchedulingTerm.md)
+ - [V1PriorityClass](docs/V1PriorityClass.md)
+ - [V1PriorityClassList](docs/V1PriorityClassList.md)
+ - [V1PriorityLevelConfiguration](docs/V1PriorityLevelConfiguration.md)
+ - [V1PriorityLevelConfigurationCondition](docs/V1PriorityLevelConfigurationCondition.md)
+ - [V1PriorityLevelConfigurationList](docs/V1PriorityLevelConfigurationList.md)
+ - [V1PriorityLevelConfigurationReference](docs/V1PriorityLevelConfigurationReference.md)
+ - [V1PriorityLevelConfigurationSpec](docs/V1PriorityLevelConfigurationSpec.md)
+ - [V1PriorityLevelConfigurationStatus](docs/V1PriorityLevelConfigurationStatus.md)
+ - [V1Probe](docs/V1Probe.md)
+ - [V1ProjectedVolumeSource](docs/V1ProjectedVolumeSource.md)
+ - [V1QueuingConfiguration](docs/V1QueuingConfiguration.md)
+ - [V1QuobyteVolumeSource](docs/V1QuobyteVolumeSource.md)
+ - [V1RBDPersistentVolumeSource](docs/V1RBDPersistentVolumeSource.md)
+ - [V1RBDVolumeSource](docs/V1RBDVolumeSource.md)
+ - [V1ReplicaSet](docs/V1ReplicaSet.md)
+ - [V1ReplicaSetCondition](docs/V1ReplicaSetCondition.md)
+ - [V1ReplicaSetList](docs/V1ReplicaSetList.md)
+ - [V1ReplicaSetSpec](docs/V1ReplicaSetSpec.md)
+ - [V1ReplicaSetStatus](docs/V1ReplicaSetStatus.md)
+ - [V1ReplicationController](docs/V1ReplicationController.md)
+ - [V1ReplicationControllerCondition](docs/V1ReplicationControllerCondition.md)
+ - [V1ReplicationControllerList](docs/V1ReplicationControllerList.md)
+ - [V1ReplicationControllerSpec](docs/V1ReplicationControllerSpec.md)
+ - [V1ReplicationControllerStatus](docs/V1ReplicationControllerStatus.md)
+ - [V1ResourceAttributes](docs/V1ResourceAttributes.md)
+ - [V1ResourceClaimConsumerReference](docs/V1ResourceClaimConsumerReference.md)
+ - [V1ResourceClaimList](docs/V1ResourceClaimList.md)
+ - [V1ResourceClaimSpec](docs/V1ResourceClaimSpec.md)
+ - [V1ResourceClaimStatus](docs/V1ResourceClaimStatus.md)
+ - [V1ResourceClaimTemplate](docs/V1ResourceClaimTemplate.md)
+ - [V1ResourceClaimTemplateList](docs/V1ResourceClaimTemplateList.md)
+ - [V1ResourceClaimTemplateSpec](docs/V1ResourceClaimTemplateSpec.md)
+ - [V1ResourceFieldSelector](docs/V1ResourceFieldSelector.md)
+ - [V1ResourceHealth](docs/V1ResourceHealth.md)
+ - [V1ResourcePolicyRule](docs/V1ResourcePolicyRule.md)
+ - [V1ResourcePool](docs/V1ResourcePool.md)
+ - [V1ResourceQuota](docs/V1ResourceQuota.md)
+ - [V1ResourceQuotaList](docs/V1ResourceQuotaList.md)
+ - [V1ResourceQuotaSpec](docs/V1ResourceQuotaSpec.md)
+ - [V1ResourceQuotaStatus](docs/V1ResourceQuotaStatus.md)
+ - [V1ResourceRequirements](docs/V1ResourceRequirements.md)
+ - [V1ResourceRule](docs/V1ResourceRule.md)
+ - [V1ResourceSlice](docs/V1ResourceSlice.md)
+ - [V1ResourceSliceList](docs/V1ResourceSliceList.md)
+ - [V1ResourceSliceSpec](docs/V1ResourceSliceSpec.md)
+ - [V1ResourceStatus](docs/V1ResourceStatus.md)
+ - [V1Role](docs/V1Role.md)
+ - [V1RoleBinding](docs/V1RoleBinding.md)
+ - [V1RoleBindingList](docs/V1RoleBindingList.md)
+ - [V1RoleList](docs/V1RoleList.md)
+ - [V1RoleRef](docs/V1RoleRef.md)
+ - [V1RollingUpdateDaemonSet](docs/V1RollingUpdateDaemonSet.md)
+ - [V1RollingUpdateDeployment](docs/V1RollingUpdateDeployment.md)
+ - [V1RollingUpdateStatefulSetStrategy](docs/V1RollingUpdateStatefulSetStrategy.md)
+ - [V1RuleWithOperations](docs/V1RuleWithOperations.md)
+ - [V1RuntimeClass](docs/V1RuntimeClass.md)
+ - [V1RuntimeClassList](docs/V1RuntimeClassList.md)
+ - [V1SELinuxOptions](docs/V1SELinuxOptions.md)
+ - [V1Scale](docs/V1Scale.md)
+ - [V1ScaleIOPersistentVolumeSource](docs/V1ScaleIOPersistentVolumeSource.md)
+ - [V1ScaleIOVolumeSource](docs/V1ScaleIOVolumeSource.md)
+ - [V1ScaleSpec](docs/V1ScaleSpec.md)
+ - [V1ScaleStatus](docs/V1ScaleStatus.md)
+ - [V1Scheduling](docs/V1Scheduling.md)
+ - [V1ScopeSelector](docs/V1ScopeSelector.md)
+ - [V1ScopedResourceSelectorRequirement](docs/V1ScopedResourceSelectorRequirement.md)
+ - [V1SeccompProfile](docs/V1SeccompProfile.md)
+ - [V1Secret](docs/V1Secret.md)
+ - [V1SecretEnvSource](docs/V1SecretEnvSource.md)
+ - [V1SecretKeySelector](docs/V1SecretKeySelector.md)
+ - [V1SecretList](docs/V1SecretList.md)
+ - [V1SecretProjection](docs/V1SecretProjection.md)
+ - [V1SecretReference](docs/V1SecretReference.md)
+ - [V1SecretVolumeSource](docs/V1SecretVolumeSource.md)
+ - [V1SecurityContext](docs/V1SecurityContext.md)
+ - [V1SelectableField](docs/V1SelectableField.md)
+ - [V1SelfSubjectAccessReview](docs/V1SelfSubjectAccessReview.md)
+ - [V1SelfSubjectAccessReviewSpec](docs/V1SelfSubjectAccessReviewSpec.md)
+ - [V1SelfSubjectReview](docs/V1SelfSubjectReview.md)
+ - [V1SelfSubjectReviewStatus](docs/V1SelfSubjectReviewStatus.md)
+ - [V1SelfSubjectRulesReview](docs/V1SelfSubjectRulesReview.md)
+ - [V1SelfSubjectRulesReviewSpec](docs/V1SelfSubjectRulesReviewSpec.md)
+ - [V1ServerAddressByClientCIDR](docs/V1ServerAddressByClientCIDR.md)
+ - [V1Service](docs/V1Service.md)
+ - [V1ServiceAccount](docs/V1ServiceAccount.md)
+ - [V1ServiceAccountList](docs/V1ServiceAccountList.md)
+ - [V1ServiceAccountSubject](docs/V1ServiceAccountSubject.md)
+ - [V1ServiceAccountTokenProjection](docs/V1ServiceAccountTokenProjection.md)
+ - [V1ServiceBackendPort](docs/V1ServiceBackendPort.md)
+ - [V1ServiceCIDR](docs/V1ServiceCIDR.md)
+ - [V1ServiceCIDRList](docs/V1ServiceCIDRList.md)
+ - [V1ServiceCIDRSpec](docs/V1ServiceCIDRSpec.md)
+ - [V1ServiceCIDRStatus](docs/V1ServiceCIDRStatus.md)
+ - [V1ServiceList](docs/V1ServiceList.md)
+ - [V1ServicePort](docs/V1ServicePort.md)
+ - [V1ServiceSpec](docs/V1ServiceSpec.md)
+ - [V1ServiceStatus](docs/V1ServiceStatus.md)
+ - [V1SessionAffinityConfig](docs/V1SessionAffinityConfig.md)
+ - [V1SleepAction](docs/V1SleepAction.md)
+ - [V1StatefulSet](docs/V1StatefulSet.md)
+ - [V1StatefulSetCondition](docs/V1StatefulSetCondition.md)
+ - [V1StatefulSetList](docs/V1StatefulSetList.md)
+ - [V1StatefulSetOrdinals](docs/V1StatefulSetOrdinals.md)
+ - [V1StatefulSetPersistentVolumeClaimRetentionPolicy](docs/V1StatefulSetPersistentVolumeClaimRetentionPolicy.md)
+ - [V1StatefulSetSpec](docs/V1StatefulSetSpec.md)
+ - [V1StatefulSetStatus](docs/V1StatefulSetStatus.md)
+ - [V1StatefulSetUpdateStrategy](docs/V1StatefulSetUpdateStrategy.md)
+ - [V1Status](docs/V1Status.md)
+ - [V1StatusCause](docs/V1StatusCause.md)
+ - [V1StatusDetails](docs/V1StatusDetails.md)
+ - [V1StorageClass](docs/V1StorageClass.md)
+ - [V1StorageClassList](docs/V1StorageClassList.md)
+ - [V1StorageOSPersistentVolumeSource](docs/V1StorageOSPersistentVolumeSource.md)
+ - [V1StorageOSVolumeSource](docs/V1StorageOSVolumeSource.md)
+ - [V1SubjectAccessReview](docs/V1SubjectAccessReview.md)
+ - [V1SubjectAccessReviewSpec](docs/V1SubjectAccessReviewSpec.md)
+ - [V1SubjectAccessReviewStatus](docs/V1SubjectAccessReviewStatus.md)
+ - [V1SubjectRulesReviewStatus](docs/V1SubjectRulesReviewStatus.md)
+ - [V1SuccessPolicy](docs/V1SuccessPolicy.md)
+ - [V1SuccessPolicyRule](docs/V1SuccessPolicyRule.md)
+ - [V1Sysctl](docs/V1Sysctl.md)
+ - [V1TCPSocketAction](docs/V1TCPSocketAction.md)
+ - [V1Taint](docs/V1Taint.md)
+ - [V1TokenRequestSpec](docs/V1TokenRequestSpec.md)
+ - [V1TokenRequestStatus](docs/V1TokenRequestStatus.md)
+ - [V1TokenReview](docs/V1TokenReview.md)
+ - [V1TokenReviewSpec](docs/V1TokenReviewSpec.md)
+ - [V1TokenReviewStatus](docs/V1TokenReviewStatus.md)
+ - [V1Toleration](docs/V1Toleration.md)
+ - [V1TopologySelectorLabelRequirement](docs/V1TopologySelectorLabelRequirement.md)
+ - [V1TopologySelectorTerm](docs/V1TopologySelectorTerm.md)
+ - [V1TopologySpreadConstraint](docs/V1TopologySpreadConstraint.md)
+ - [V1TypeChecking](docs/V1TypeChecking.md)
+ - [V1TypedLocalObjectReference](docs/V1TypedLocalObjectReference.md)
+ - [V1TypedObjectReference](docs/V1TypedObjectReference.md)
+ - [V1UncountedTerminatedPods](docs/V1UncountedTerminatedPods.md)
+ - [V1UserInfo](docs/V1UserInfo.md)
+ - [V1UserSubject](docs/V1UserSubject.md)
+ - [V1ValidatingAdmissionPolicy](docs/V1ValidatingAdmissionPolicy.md)
+ - [V1ValidatingAdmissionPolicyBinding](docs/V1ValidatingAdmissionPolicyBinding.md)
+ - [V1ValidatingAdmissionPolicyBindingList](docs/V1ValidatingAdmissionPolicyBindingList.md)
+ - [V1ValidatingAdmissionPolicyBindingSpec](docs/V1ValidatingAdmissionPolicyBindingSpec.md)
+ - [V1ValidatingAdmissionPolicyList](docs/V1ValidatingAdmissionPolicyList.md)
+ - [V1ValidatingAdmissionPolicySpec](docs/V1ValidatingAdmissionPolicySpec.md)
+ - [V1ValidatingAdmissionPolicyStatus](docs/V1ValidatingAdmissionPolicyStatus.md)
+ - [V1ValidatingWebhook](docs/V1ValidatingWebhook.md)
+ - [V1ValidatingWebhookConfiguration](docs/V1ValidatingWebhookConfiguration.md)
+ - [V1ValidatingWebhookConfigurationList](docs/V1ValidatingWebhookConfigurationList.md)
+ - [V1Validation](docs/V1Validation.md)
+ - [V1ValidationRule](docs/V1ValidationRule.md)
+ - [V1Variable](docs/V1Variable.md)
+ - [V1Volume](docs/V1Volume.md)
+ - [V1VolumeAttachment](docs/V1VolumeAttachment.md)
+ - [V1VolumeAttachmentList](docs/V1VolumeAttachmentList.md)
+ - [V1VolumeAttachmentSource](docs/V1VolumeAttachmentSource.md)
+ - [V1VolumeAttachmentSpec](docs/V1VolumeAttachmentSpec.md)
+ - [V1VolumeAttachmentStatus](docs/V1VolumeAttachmentStatus.md)
+ - [V1VolumeAttributesClass](docs/V1VolumeAttributesClass.md)
+ - [V1VolumeAttributesClassList](docs/V1VolumeAttributesClassList.md)
+ - [V1VolumeDevice](docs/V1VolumeDevice.md)
+ - [V1VolumeError](docs/V1VolumeError.md)
+ - [V1VolumeMount](docs/V1VolumeMount.md)
+ - [V1VolumeMountStatus](docs/V1VolumeMountStatus.md)
+ - [V1VolumeNodeAffinity](docs/V1VolumeNodeAffinity.md)
+ - [V1VolumeNodeResources](docs/V1VolumeNodeResources.md)
+ - [V1VolumeProjection](docs/V1VolumeProjection.md)
+ - [V1VolumeResourceRequirements](docs/V1VolumeResourceRequirements.md)
+ - [V1VsphereVirtualDiskVolumeSource](docs/V1VsphereVirtualDiskVolumeSource.md)
+ - [V1WatchEvent](docs/V1WatchEvent.md)
+ - [V1WebhookConversion](docs/V1WebhookConversion.md)
+ - [V1WeightedPodAffinityTerm](docs/V1WeightedPodAffinityTerm.md)
+ - [V1WindowsSecurityContextOptions](docs/V1WindowsSecurityContextOptions.md)
+ - [V1WorkloadReference](docs/V1WorkloadReference.md)
+ - [V1alpha1ApplyConfiguration](docs/V1alpha1ApplyConfiguration.md)
+ - [V1alpha1ClusterTrustBundle](docs/V1alpha1ClusterTrustBundle.md)
+ - [V1alpha1ClusterTrustBundleList](docs/V1alpha1ClusterTrustBundleList.md)
+ - [V1alpha1ClusterTrustBundleSpec](docs/V1alpha1ClusterTrustBundleSpec.md)
+ - [V1alpha1GangSchedulingPolicy](docs/V1alpha1GangSchedulingPolicy.md)
+ - [V1alpha1JSONPatch](docs/V1alpha1JSONPatch.md)
+ - [V1alpha1MatchCondition](docs/V1alpha1MatchCondition.md)
+ - [V1alpha1MatchResources](docs/V1alpha1MatchResources.md)
+ - [V1alpha1MutatingAdmissionPolicy](docs/V1alpha1MutatingAdmissionPolicy.md)
+ - [V1alpha1MutatingAdmissionPolicyBinding](docs/V1alpha1MutatingAdmissionPolicyBinding.md)
+ - [V1alpha1MutatingAdmissionPolicyBindingList](docs/V1alpha1MutatingAdmissionPolicyBindingList.md)
+ - [V1alpha1MutatingAdmissionPolicyBindingSpec](docs/V1alpha1MutatingAdmissionPolicyBindingSpec.md)
+ - [V1alpha1MutatingAdmissionPolicyList](docs/V1alpha1MutatingAdmissionPolicyList.md)
+ - [V1alpha1MutatingAdmissionPolicySpec](docs/V1alpha1MutatingAdmissionPolicySpec.md)
+ - [V1alpha1Mutation](docs/V1alpha1Mutation.md)
+ - [V1alpha1NamedRuleWithOperations](docs/V1alpha1NamedRuleWithOperations.md)
+ - [V1alpha1ParamKind](docs/V1alpha1ParamKind.md)
+ - [V1alpha1ParamRef](docs/V1alpha1ParamRef.md)
+ - [V1alpha1PodGroup](docs/V1alpha1PodGroup.md)
+ - [V1alpha1PodGroupPolicy](docs/V1alpha1PodGroupPolicy.md)
+ - [V1alpha1ServerStorageVersion](docs/V1alpha1ServerStorageVersion.md)
+ - [V1alpha1StorageVersion](docs/V1alpha1StorageVersion.md)
+ - [V1alpha1StorageVersionCondition](docs/V1alpha1StorageVersionCondition.md)
+ - [V1alpha1StorageVersionList](docs/V1alpha1StorageVersionList.md)
+ - [V1alpha1StorageVersionStatus](docs/V1alpha1StorageVersionStatus.md)
+ - [V1alpha1TypedLocalObjectReference](docs/V1alpha1TypedLocalObjectReference.md)
+ - [V1alpha1Variable](docs/V1alpha1Variable.md)
+ - [V1alpha1Workload](docs/V1alpha1Workload.md)
+ - [V1alpha1WorkloadList](docs/V1alpha1WorkloadList.md)
+ - [V1alpha1WorkloadSpec](docs/V1alpha1WorkloadSpec.md)
+ - [V1alpha2LeaseCandidate](docs/V1alpha2LeaseCandidate.md)
+ - [V1alpha2LeaseCandidateList](docs/V1alpha2LeaseCandidateList.md)
+ - [V1alpha2LeaseCandidateSpec](docs/V1alpha2LeaseCandidateSpec.md)
+ - [V1alpha3DeviceTaint](docs/V1alpha3DeviceTaint.md)
+ - [V1alpha3DeviceTaintRule](docs/V1alpha3DeviceTaintRule.md)
+ - [V1alpha3DeviceTaintRuleList](docs/V1alpha3DeviceTaintRuleList.md)
+ - [V1alpha3DeviceTaintRuleSpec](docs/V1alpha3DeviceTaintRuleSpec.md)
+ - [V1alpha3DeviceTaintRuleStatus](docs/V1alpha3DeviceTaintRuleStatus.md)
+ - [V1alpha3DeviceTaintSelector](docs/V1alpha3DeviceTaintSelector.md)
+ - [V1beta1AllocatedDeviceStatus](docs/V1beta1AllocatedDeviceStatus.md)
+ - [V1beta1AllocationResult](docs/V1beta1AllocationResult.md)
+ - [V1beta1ApplyConfiguration](docs/V1beta1ApplyConfiguration.md)
+ - [V1beta1BasicDevice](docs/V1beta1BasicDevice.md)
+ - [V1beta1CELDeviceSelector](docs/V1beta1CELDeviceSelector.md)
+ - [V1beta1CapacityRequestPolicy](docs/V1beta1CapacityRequestPolicy.md)
+ - [V1beta1CapacityRequestPolicyRange](docs/V1beta1CapacityRequestPolicyRange.md)
+ - [V1beta1CapacityRequirements](docs/V1beta1CapacityRequirements.md)
+ - [V1beta1ClusterTrustBundle](docs/V1beta1ClusterTrustBundle.md)
+ - [V1beta1ClusterTrustBundleList](docs/V1beta1ClusterTrustBundleList.md)
+ - [V1beta1ClusterTrustBundleSpec](docs/V1beta1ClusterTrustBundleSpec.md)
+ - [V1beta1Counter](docs/V1beta1Counter.md)
+ - [V1beta1CounterSet](docs/V1beta1CounterSet.md)
+ - [V1beta1Device](docs/V1beta1Device.md)
+ - [V1beta1DeviceAllocationConfiguration](docs/V1beta1DeviceAllocationConfiguration.md)
+ - [V1beta1DeviceAllocationResult](docs/V1beta1DeviceAllocationResult.md)
+ - [V1beta1DeviceAttribute](docs/V1beta1DeviceAttribute.md)
+ - [V1beta1DeviceCapacity](docs/V1beta1DeviceCapacity.md)
+ - [V1beta1DeviceClaim](docs/V1beta1DeviceClaim.md)
+ - [V1beta1DeviceClaimConfiguration](docs/V1beta1DeviceClaimConfiguration.md)
+ - [V1beta1DeviceClass](docs/V1beta1DeviceClass.md)
+ - [V1beta1DeviceClassConfiguration](docs/V1beta1DeviceClassConfiguration.md)
+ - [V1beta1DeviceClassList](docs/V1beta1DeviceClassList.md)
+ - [V1beta1DeviceClassSpec](docs/V1beta1DeviceClassSpec.md)
+ - [V1beta1DeviceConstraint](docs/V1beta1DeviceConstraint.md)
+ - [V1beta1DeviceCounterConsumption](docs/V1beta1DeviceCounterConsumption.md)
+ - [V1beta1DeviceRequest](docs/V1beta1DeviceRequest.md)
+ - [V1beta1DeviceRequestAllocationResult](docs/V1beta1DeviceRequestAllocationResult.md)
+ - [V1beta1DeviceSelector](docs/V1beta1DeviceSelector.md)
+ - [V1beta1DeviceSubRequest](docs/V1beta1DeviceSubRequest.md)
+ - [V1beta1DeviceTaint](docs/V1beta1DeviceTaint.md)
+ - [V1beta1DeviceToleration](docs/V1beta1DeviceToleration.md)
+ - [V1beta1IPAddress](docs/V1beta1IPAddress.md)
+ - [V1beta1IPAddressList](docs/V1beta1IPAddressList.md)
+ - [V1beta1IPAddressSpec](docs/V1beta1IPAddressSpec.md)
+ - [V1beta1JSONPatch](docs/V1beta1JSONPatch.md)
+ - [V1beta1LeaseCandidate](docs/V1beta1LeaseCandidate.md)
+ - [V1beta1LeaseCandidateList](docs/V1beta1LeaseCandidateList.md)
+ - [V1beta1LeaseCandidateSpec](docs/V1beta1LeaseCandidateSpec.md)
+ - [V1beta1MatchCondition](docs/V1beta1MatchCondition.md)
+ - [V1beta1MatchResources](docs/V1beta1MatchResources.md)
+ - [V1beta1MutatingAdmissionPolicy](docs/V1beta1MutatingAdmissionPolicy.md)
+ - [V1beta1MutatingAdmissionPolicyBinding](docs/V1beta1MutatingAdmissionPolicyBinding.md)
+ - [V1beta1MutatingAdmissionPolicyBindingList](docs/V1beta1MutatingAdmissionPolicyBindingList.md)
+ - [V1beta1MutatingAdmissionPolicyBindingSpec](docs/V1beta1MutatingAdmissionPolicyBindingSpec.md)
+ - [V1beta1MutatingAdmissionPolicyList](docs/V1beta1MutatingAdmissionPolicyList.md)
+ - [V1beta1MutatingAdmissionPolicySpec](docs/V1beta1MutatingAdmissionPolicySpec.md)
+ - [V1beta1Mutation](docs/V1beta1Mutation.md)
+ - [V1beta1NamedRuleWithOperations](docs/V1beta1NamedRuleWithOperations.md)
+ - [V1beta1NetworkDeviceData](docs/V1beta1NetworkDeviceData.md)
+ - [V1beta1OpaqueDeviceConfiguration](docs/V1beta1OpaqueDeviceConfiguration.md)
+ - [V1beta1ParamKind](docs/V1beta1ParamKind.md)
+ - [V1beta1ParamRef](docs/V1beta1ParamRef.md)
+ - [V1beta1ParentReference](docs/V1beta1ParentReference.md)
+ - [V1beta1PodCertificateRequest](docs/V1beta1PodCertificateRequest.md)
+ - [V1beta1PodCertificateRequestList](docs/V1beta1PodCertificateRequestList.md)
+ - [V1beta1PodCertificateRequestSpec](docs/V1beta1PodCertificateRequestSpec.md)
+ - [V1beta1PodCertificateRequestStatus](docs/V1beta1PodCertificateRequestStatus.md)
+ - [V1beta1ResourceClaim](docs/V1beta1ResourceClaim.md)
+ - [V1beta1ResourceClaimConsumerReference](docs/V1beta1ResourceClaimConsumerReference.md)
+ - [V1beta1ResourceClaimList](docs/V1beta1ResourceClaimList.md)
+ - [V1beta1ResourceClaimSpec](docs/V1beta1ResourceClaimSpec.md)
+ - [V1beta1ResourceClaimStatus](docs/V1beta1ResourceClaimStatus.md)
+ - [V1beta1ResourceClaimTemplate](docs/V1beta1ResourceClaimTemplate.md)
+ - [V1beta1ResourceClaimTemplateList](docs/V1beta1ResourceClaimTemplateList.md)
+ - [V1beta1ResourceClaimTemplateSpec](docs/V1beta1ResourceClaimTemplateSpec.md)
+ - [V1beta1ResourcePool](docs/V1beta1ResourcePool.md)
+ - [V1beta1ResourceSlice](docs/V1beta1ResourceSlice.md)
+ - [V1beta1ResourceSliceList](docs/V1beta1ResourceSliceList.md)
+ - [V1beta1ResourceSliceSpec](docs/V1beta1ResourceSliceSpec.md)
+ - [V1beta1ServiceCIDR](docs/V1beta1ServiceCIDR.md)
+ - [V1beta1ServiceCIDRList](docs/V1beta1ServiceCIDRList.md)
+ - [V1beta1ServiceCIDRSpec](docs/V1beta1ServiceCIDRSpec.md)
+ - [V1beta1ServiceCIDRStatus](docs/V1beta1ServiceCIDRStatus.md)
+ - [V1beta1StorageVersionMigration](docs/V1beta1StorageVersionMigration.md)
+ - [V1beta1StorageVersionMigrationList](docs/V1beta1StorageVersionMigrationList.md)
+ - [V1beta1StorageVersionMigrationSpec](docs/V1beta1StorageVersionMigrationSpec.md)
+ - [V1beta1StorageVersionMigrationStatus](docs/V1beta1StorageVersionMigrationStatus.md)
+ - [V1beta1Variable](docs/V1beta1Variable.md)
+ - [V1beta1VolumeAttributesClass](docs/V1beta1VolumeAttributesClass.md)
+ - [V1beta1VolumeAttributesClassList](docs/V1beta1VolumeAttributesClassList.md)
+ - [V1beta2AllocatedDeviceStatus](docs/V1beta2AllocatedDeviceStatus.md)
+ - [V1beta2AllocationResult](docs/V1beta2AllocationResult.md)
+ - [V1beta2CELDeviceSelector](docs/V1beta2CELDeviceSelector.md)
+ - [V1beta2CapacityRequestPolicy](docs/V1beta2CapacityRequestPolicy.md)
+ - [V1beta2CapacityRequestPolicyRange](docs/V1beta2CapacityRequestPolicyRange.md)
+ - [V1beta2CapacityRequirements](docs/V1beta2CapacityRequirements.md)
+ - [V1beta2Counter](docs/V1beta2Counter.md)
+ - [V1beta2CounterSet](docs/V1beta2CounterSet.md)
+ - [V1beta2Device](docs/V1beta2Device.md)
+ - [V1beta2DeviceAllocationConfiguration](docs/V1beta2DeviceAllocationConfiguration.md)
+ - [V1beta2DeviceAllocationResult](docs/V1beta2DeviceAllocationResult.md)
+ - [V1beta2DeviceAttribute](docs/V1beta2DeviceAttribute.md)
+ - [V1beta2DeviceCapacity](docs/V1beta2DeviceCapacity.md)
+ - [V1beta2DeviceClaim](docs/V1beta2DeviceClaim.md)
+ - [V1beta2DeviceClaimConfiguration](docs/V1beta2DeviceClaimConfiguration.md)
+ - [V1beta2DeviceClass](docs/V1beta2DeviceClass.md)
+ - [V1beta2DeviceClassConfiguration](docs/V1beta2DeviceClassConfiguration.md)
+ - [V1beta2DeviceClassList](docs/V1beta2DeviceClassList.md)
+ - [V1beta2DeviceClassSpec](docs/V1beta2DeviceClassSpec.md)
+ - [V1beta2DeviceConstraint](docs/V1beta2DeviceConstraint.md)
+ - [V1beta2DeviceCounterConsumption](docs/V1beta2DeviceCounterConsumption.md)
+ - [V1beta2DeviceRequest](docs/V1beta2DeviceRequest.md)
+ - [V1beta2DeviceRequestAllocationResult](docs/V1beta2DeviceRequestAllocationResult.md)
+ - [V1beta2DeviceSelector](docs/V1beta2DeviceSelector.md)
+ - [V1beta2DeviceSubRequest](docs/V1beta2DeviceSubRequest.md)
+ - [V1beta2DeviceTaint](docs/V1beta2DeviceTaint.md)
+ - [V1beta2DeviceToleration](docs/V1beta2DeviceToleration.md)
+ - [V1beta2ExactDeviceRequest](docs/V1beta2ExactDeviceRequest.md)
+ - [V1beta2NetworkDeviceData](docs/V1beta2NetworkDeviceData.md)
+ - [V1beta2OpaqueDeviceConfiguration](docs/V1beta2OpaqueDeviceConfiguration.md)
+ - [V1beta2ResourceClaim](docs/V1beta2ResourceClaim.md)
+ - [V1beta2ResourceClaimConsumerReference](docs/V1beta2ResourceClaimConsumerReference.md)
+ - [V1beta2ResourceClaimList](docs/V1beta2ResourceClaimList.md)
+ - [V1beta2ResourceClaimSpec](docs/V1beta2ResourceClaimSpec.md)
+ - [V1beta2ResourceClaimStatus](docs/V1beta2ResourceClaimStatus.md)
+ - [V1beta2ResourceClaimTemplate](docs/V1beta2ResourceClaimTemplate.md)
+ - [V1beta2ResourceClaimTemplateList](docs/V1beta2ResourceClaimTemplateList.md)
+ - [V1beta2ResourceClaimTemplateSpec](docs/V1beta2ResourceClaimTemplateSpec.md)
+ - [V1beta2ResourcePool](docs/V1beta2ResourcePool.md)
+ - [V1beta2ResourceSlice](docs/V1beta2ResourceSlice.md)
+ - [V1beta2ResourceSliceList](docs/V1beta2ResourceSliceList.md)
+ - [V1beta2ResourceSliceSpec](docs/V1beta2ResourceSliceSpec.md)
+ - [V2APIGroupDiscovery](docs/V2APIGroupDiscovery.md)
+ - [V2APIGroupDiscoveryList](docs/V2APIGroupDiscoveryList.md)
+ - [V2APIResourceDiscovery](docs/V2APIResourceDiscovery.md)
+ - [V2APISubresourceDiscovery](docs/V2APISubresourceDiscovery.md)
+ - [V2APIVersionDiscovery](docs/V2APIVersionDiscovery.md)
+ - [V2ContainerResourceMetricSource](docs/V2ContainerResourceMetricSource.md)
+ - [V2ContainerResourceMetricStatus](docs/V2ContainerResourceMetricStatus.md)
+ - [V2CrossVersionObjectReference](docs/V2CrossVersionObjectReference.md)
+ - [V2ExternalMetricSource](docs/V2ExternalMetricSource.md)
+ - [V2ExternalMetricStatus](docs/V2ExternalMetricStatus.md)
+ - [V2HPAScalingPolicy](docs/V2HPAScalingPolicy.md)
+ - [V2HPAScalingRules](docs/V2HPAScalingRules.md)
+ - [V2HorizontalPodAutoscaler](docs/V2HorizontalPodAutoscaler.md)
+ - [V2HorizontalPodAutoscalerBehavior](docs/V2HorizontalPodAutoscalerBehavior.md)
+ - [V2HorizontalPodAutoscalerCondition](docs/V2HorizontalPodAutoscalerCondition.md)
+ - [V2HorizontalPodAutoscalerList](docs/V2HorizontalPodAutoscalerList.md)
+ - [V2HorizontalPodAutoscalerSpec](docs/V2HorizontalPodAutoscalerSpec.md)
+ - [V2HorizontalPodAutoscalerStatus](docs/V2HorizontalPodAutoscalerStatus.md)
+ - [V2MetricIdentifier](docs/V2MetricIdentifier.md)
+ - [V2MetricSpec](docs/V2MetricSpec.md)
+ - [V2MetricStatus](docs/V2MetricStatus.md)
+ - [V2MetricTarget](docs/V2MetricTarget.md)
+ - [V2MetricValueStatus](docs/V2MetricValueStatus.md)
+ - [V2ObjectMetricSource](docs/V2ObjectMetricSource.md)
+ - [V2ObjectMetricStatus](docs/V2ObjectMetricStatus.md)
+ - [V2PodsMetricSource](docs/V2PodsMetricSource.md)
+ - [V2PodsMetricStatus](docs/V2PodsMetricStatus.md)
+ - [V2ResourceMetricSource](docs/V2ResourceMetricSource.md)
+ - [V2ResourceMetricStatus](docs/V2ResourceMetricStatus.md)
+ - [V2beta1APIGroupDiscovery](docs/V2beta1APIGroupDiscovery.md)
+ - [V2beta1APIGroupDiscoveryList](docs/V2beta1APIGroupDiscoveryList.md)
+ - [V2beta1APIResourceDiscovery](docs/V2beta1APIResourceDiscovery.md)
+ - [V2beta1APISubresourceDiscovery](docs/V2beta1APISubresourceDiscovery.md)
+ - [V2beta1APIVersionDiscovery](docs/V2beta1APIVersionDiscovery.md)
+ - [VersionInfo](docs/VersionInfo.md)
+
+
+
+## Documentation For Authorization
+
+
+Authentication schemes defined for the API:
+
+### BearerToken
+
+- **Type**: API key
+- **API key parameter name**: authorization
+- **Location**: HTTP header
+
+
+## Author
+
+
+
+
diff --git a/kubernetes_asyncio/__init__.py b/kubernetes_asyncio/__init__.py
new file mode 100644
index 0000000000..2ddf0e832c
--- /dev/null
+++ b/kubernetes_asyncio/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2026 The Kubernetes Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+__project__ = "kubernetes_asyncio"
+# The version is auto-updated. Please do not edit.
+__version__ = "35.0.0+snapshot"
+
+import kubernetes_asyncio.client as client
+
+__all__ = ["client"]
diff --git a/kubernetes_asyncio/client/__init__.py b/kubernetes_asyncio/client/__init__.py
new file mode 100644
index 0000000000..b63e0fd0a7
--- /dev/null
+++ b/kubernetes_asyncio/client/__init__.py
@@ -0,0 +1,827 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+ Kubernetes
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
+
+ The version of the OpenAPI document: release-1.35
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+__version__ = "35.0.0+snapshot"
+
+# import apis into sdk package
+from kubernetes_asyncio.client.api.well_known_api import WellKnownApi
+from kubernetes_asyncio.client.api.admissionregistration_api import AdmissionregistrationApi
+from kubernetes_asyncio.client.api.admissionregistration_v1_api import AdmissionregistrationV1Api
+from kubernetes_asyncio.client.api.admissionregistration_v1alpha1_api import AdmissionregistrationV1alpha1Api
+from kubernetes_asyncio.client.api.admissionregistration_v1beta1_api import AdmissionregistrationV1beta1Api
+from kubernetes_asyncio.client.api.apiextensions_api import ApiextensionsApi
+from kubernetes_asyncio.client.api.apiextensions_v1_api import ApiextensionsV1Api
+from kubernetes_asyncio.client.api.apiregistration_api import ApiregistrationApi
+from kubernetes_asyncio.client.api.apiregistration_v1_api import ApiregistrationV1Api
+from kubernetes_asyncio.client.api.apis_api import ApisApi
+from kubernetes_asyncio.client.api.apps_api import AppsApi
+from kubernetes_asyncio.client.api.apps_v1_api import AppsV1Api
+from kubernetes_asyncio.client.api.authentication_api import AuthenticationApi
+from kubernetes_asyncio.client.api.authentication_v1_api import AuthenticationV1Api
+from kubernetes_asyncio.client.api.authorization_api import AuthorizationApi
+from kubernetes_asyncio.client.api.authorization_v1_api import AuthorizationV1Api
+from kubernetes_asyncio.client.api.autoscaling_api import AutoscalingApi
+from kubernetes_asyncio.client.api.autoscaling_v1_api import AutoscalingV1Api
+from kubernetes_asyncio.client.api.autoscaling_v2_api import AutoscalingV2Api
+from kubernetes_asyncio.client.api.batch_api import BatchApi
+from kubernetes_asyncio.client.api.batch_v1_api import BatchV1Api
+from kubernetes_asyncio.client.api.certificates_api import CertificatesApi
+from kubernetes_asyncio.client.api.certificates_v1_api import CertificatesV1Api
+from kubernetes_asyncio.client.api.certificates_v1alpha1_api import CertificatesV1alpha1Api
+from kubernetes_asyncio.client.api.certificates_v1beta1_api import CertificatesV1beta1Api
+from kubernetes_asyncio.client.api.coordination_api import CoordinationApi
+from kubernetes_asyncio.client.api.coordination_v1_api import CoordinationV1Api
+from kubernetes_asyncio.client.api.coordination_v1alpha2_api import CoordinationV1alpha2Api
+from kubernetes_asyncio.client.api.coordination_v1beta1_api import CoordinationV1beta1Api
+from kubernetes_asyncio.client.api.core_api import CoreApi
+from kubernetes_asyncio.client.api.core_v1_api import CoreV1Api
+from kubernetes_asyncio.client.api.custom_objects_api import CustomObjectsApi
+from kubernetes_asyncio.client.api.discovery_api import DiscoveryApi
+from kubernetes_asyncio.client.api.discovery_v1_api import DiscoveryV1Api
+from kubernetes_asyncio.client.api.events_api import EventsApi
+from kubernetes_asyncio.client.api.events_v1_api import EventsV1Api
+from kubernetes_asyncio.client.api.flowcontrol_apiserver_api import FlowcontrolApiserverApi
+from kubernetes_asyncio.client.api.flowcontrol_apiserver_v1_api import FlowcontrolApiserverV1Api
+from kubernetes_asyncio.client.api.internal_apiserver_api import InternalApiserverApi
+from kubernetes_asyncio.client.api.internal_apiserver_v1alpha1_api import InternalApiserverV1alpha1Api
+from kubernetes_asyncio.client.api.logs_api import LogsApi
+from kubernetes_asyncio.client.api.networking_api import NetworkingApi
+from kubernetes_asyncio.client.api.networking_v1_api import NetworkingV1Api
+from kubernetes_asyncio.client.api.networking_v1beta1_api import NetworkingV1beta1Api
+from kubernetes_asyncio.client.api.node_api import NodeApi
+from kubernetes_asyncio.client.api.node_v1_api import NodeV1Api
+from kubernetes_asyncio.client.api.openid_api import OpenidApi
+from kubernetes_asyncio.client.api.policy_api import PolicyApi
+from kubernetes_asyncio.client.api.policy_v1_api import PolicyV1Api
+from kubernetes_asyncio.client.api.rbac_authorization_api import RbacAuthorizationApi
+from kubernetes_asyncio.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api
+from kubernetes_asyncio.client.api.resource_api import ResourceApi
+from kubernetes_asyncio.client.api.resource_v1_api import ResourceV1Api
+from kubernetes_asyncio.client.api.resource_v1alpha3_api import ResourceV1alpha3Api
+from kubernetes_asyncio.client.api.resource_v1beta1_api import ResourceV1beta1Api
+from kubernetes_asyncio.client.api.resource_v1beta2_api import ResourceV1beta2Api
+from kubernetes_asyncio.client.api.scheduling_api import SchedulingApi
+from kubernetes_asyncio.client.api.scheduling_v1_api import SchedulingV1Api
+from kubernetes_asyncio.client.api.scheduling_v1alpha1_api import SchedulingV1alpha1Api
+from kubernetes_asyncio.client.api.storage_api import StorageApi
+from kubernetes_asyncio.client.api.storage_v1_api import StorageV1Api
+from kubernetes_asyncio.client.api.storage_v1beta1_api import StorageV1beta1Api
+from kubernetes_asyncio.client.api.storagemigration_api import StoragemigrationApi
+from kubernetes_asyncio.client.api.storagemigration_v1beta1_api import StoragemigrationV1beta1Api
+from kubernetes_asyncio.client.api.version_api import VersionApi
+
+# import ApiClient
+from kubernetes_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.configuration import Configuration
+from kubernetes_asyncio.client.exceptions import OpenApiException
+from kubernetes_asyncio.client.exceptions import ApiTypeError
+from kubernetes_asyncio.client.exceptions import ApiValueError
+from kubernetes_asyncio.client.exceptions import ApiKeyError
+from kubernetes_asyncio.client.exceptions import ApiAttributeError
+from kubernetes_asyncio.client.exceptions import ApiException
+# import models into sdk package
+from kubernetes_asyncio.client.models.admissionregistration_v1_service_reference import AdmissionregistrationV1ServiceReference
+from kubernetes_asyncio.client.models.admissionregistration_v1_webhook_client_config import AdmissionregistrationV1WebhookClientConfig
+from kubernetes_asyncio.client.models.apiextensions_v1_service_reference import ApiextensionsV1ServiceReference
+from kubernetes_asyncio.client.models.apiextensions_v1_webhook_client_config import ApiextensionsV1WebhookClientConfig
+from kubernetes_asyncio.client.models.apiregistration_v1_service_reference import ApiregistrationV1ServiceReference
+from kubernetes_asyncio.client.models.authentication_v1_token_request import AuthenticationV1TokenRequest
+from kubernetes_asyncio.client.models.core_v1_endpoint_port import CoreV1EndpointPort
+from kubernetes_asyncio.client.models.core_v1_event import CoreV1Event
+from kubernetes_asyncio.client.models.core_v1_event_list import CoreV1EventList
+from kubernetes_asyncio.client.models.core_v1_event_series import CoreV1EventSeries
+from kubernetes_asyncio.client.models.core_v1_resource_claim import CoreV1ResourceClaim
+from kubernetes_asyncio.client.models.discovery_v1_endpoint_port import DiscoveryV1EndpointPort
+from kubernetes_asyncio.client.models.events_v1_event import EventsV1Event
+from kubernetes_asyncio.client.models.events_v1_event_list import EventsV1EventList
+from kubernetes_asyncio.client.models.events_v1_event_series import EventsV1EventSeries
+from kubernetes_asyncio.client.models.flowcontrol_v1_subject import FlowcontrolV1Subject
+from kubernetes_asyncio.client.models.rbac_v1_subject import RbacV1Subject
+from kubernetes_asyncio.client.models.resource_v1_resource_claim import ResourceV1ResourceClaim
+from kubernetes_asyncio.client.models.storage_v1_token_request import StorageV1TokenRequest
+from kubernetes_asyncio.client.models.v1_api_group import V1APIGroup
+from kubernetes_asyncio.client.models.v1_api_group_list import V1APIGroupList
+from kubernetes_asyncio.client.models.v1_api_resource import V1APIResource
+from kubernetes_asyncio.client.models.v1_api_resource_list import V1APIResourceList
+from kubernetes_asyncio.client.models.v1_api_service import V1APIService
+from kubernetes_asyncio.client.models.v1_api_service_condition import V1APIServiceCondition
+from kubernetes_asyncio.client.models.v1_api_service_list import V1APIServiceList
+from kubernetes_asyncio.client.models.v1_api_service_spec import V1APIServiceSpec
+from kubernetes_asyncio.client.models.v1_api_service_status import V1APIServiceStatus
+from kubernetes_asyncio.client.models.v1_api_versions import V1APIVersions
+from kubernetes_asyncio.client.models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
+from kubernetes_asyncio.client.models.v1_affinity import V1Affinity
+from kubernetes_asyncio.client.models.v1_aggregation_rule import V1AggregationRule
+from kubernetes_asyncio.client.models.v1_allocated_device_status import V1AllocatedDeviceStatus
+from kubernetes_asyncio.client.models.v1_allocation_result import V1AllocationResult
+from kubernetes_asyncio.client.models.v1_app_armor_profile import V1AppArmorProfile
+from kubernetes_asyncio.client.models.v1_attached_volume import V1AttachedVolume
+from kubernetes_asyncio.client.models.v1_audit_annotation import V1AuditAnnotation
+from kubernetes_asyncio.client.models.v1_azure_disk_volume_source import V1AzureDiskVolumeSource
+from kubernetes_asyncio.client.models.v1_azure_file_persistent_volume_source import V1AzureFilePersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource
+from kubernetes_asyncio.client.models.v1_binding import V1Binding
+from kubernetes_asyncio.client.models.v1_bound_object_reference import V1BoundObjectReference
+from kubernetes_asyncio.client.models.v1_cel_device_selector import V1CELDeviceSelector
+from kubernetes_asyncio.client.models.v1_csi_driver import V1CSIDriver
+from kubernetes_asyncio.client.models.v1_csi_driver_list import V1CSIDriverList
+from kubernetes_asyncio.client.models.v1_csi_driver_spec import V1CSIDriverSpec
+from kubernetes_asyncio.client.models.v1_csi_node import V1CSINode
+from kubernetes_asyncio.client.models.v1_csi_node_driver import V1CSINodeDriver
+from kubernetes_asyncio.client.models.v1_csi_node_list import V1CSINodeList
+from kubernetes_asyncio.client.models.v1_csi_node_spec import V1CSINodeSpec
+from kubernetes_asyncio.client.models.v1_csi_persistent_volume_source import V1CSIPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_csi_storage_capacity import V1CSIStorageCapacity
+from kubernetes_asyncio.client.models.v1_csi_storage_capacity_list import V1CSIStorageCapacityList
+from kubernetes_asyncio.client.models.v1_csi_volume_source import V1CSIVolumeSource
+from kubernetes_asyncio.client.models.v1_capabilities import V1Capabilities
+from kubernetes_asyncio.client.models.v1_capacity_request_policy import V1CapacityRequestPolicy
+from kubernetes_asyncio.client.models.v1_capacity_request_policy_range import V1CapacityRequestPolicyRange
+from kubernetes_asyncio.client.models.v1_capacity_requirements import V1CapacityRequirements
+from kubernetes_asyncio.client.models.v1_ceph_fs_persistent_volume_source import V1CephFSPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource
+from kubernetes_asyncio.client.models.v1_certificate_signing_request import V1CertificateSigningRequest
+from kubernetes_asyncio.client.models.v1_certificate_signing_request_condition import V1CertificateSigningRequestCondition
+from kubernetes_asyncio.client.models.v1_certificate_signing_request_list import V1CertificateSigningRequestList
+from kubernetes_asyncio.client.models.v1_certificate_signing_request_spec import V1CertificateSigningRequestSpec
+from kubernetes_asyncio.client.models.v1_certificate_signing_request_status import V1CertificateSigningRequestStatus
+from kubernetes_asyncio.client.models.v1_cinder_persistent_volume_source import V1CinderPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_cinder_volume_source import V1CinderVolumeSource
+from kubernetes_asyncio.client.models.v1_client_ip_config import V1ClientIPConfig
+from kubernetes_asyncio.client.models.v1_cluster_role import V1ClusterRole
+from kubernetes_asyncio.client.models.v1_cluster_role_binding import V1ClusterRoleBinding
+from kubernetes_asyncio.client.models.v1_cluster_role_binding_list import V1ClusterRoleBindingList
+from kubernetes_asyncio.client.models.v1_cluster_role_list import V1ClusterRoleList
+from kubernetes_asyncio.client.models.v1_cluster_trust_bundle_projection import V1ClusterTrustBundleProjection
+from kubernetes_asyncio.client.models.v1_component_condition import V1ComponentCondition
+from kubernetes_asyncio.client.models.v1_component_status import V1ComponentStatus
+from kubernetes_asyncio.client.models.v1_component_status_list import V1ComponentStatusList
+from kubernetes_asyncio.client.models.v1_condition import V1Condition
+from kubernetes_asyncio.client.models.v1_config_map import V1ConfigMap
+from kubernetes_asyncio.client.models.v1_config_map_env_source import V1ConfigMapEnvSource
+from kubernetes_asyncio.client.models.v1_config_map_key_selector import V1ConfigMapKeySelector
+from kubernetes_asyncio.client.models.v1_config_map_list import V1ConfigMapList
+from kubernetes_asyncio.client.models.v1_config_map_node_config_source import V1ConfigMapNodeConfigSource
+from kubernetes_asyncio.client.models.v1_config_map_projection import V1ConfigMapProjection
+from kubernetes_asyncio.client.models.v1_config_map_volume_source import V1ConfigMapVolumeSource
+from kubernetes_asyncio.client.models.v1_container import V1Container
+from kubernetes_asyncio.client.models.v1_container_extended_resource_request import V1ContainerExtendedResourceRequest
+from kubernetes_asyncio.client.models.v1_container_image import V1ContainerImage
+from kubernetes_asyncio.client.models.v1_container_port import V1ContainerPort
+from kubernetes_asyncio.client.models.v1_container_resize_policy import V1ContainerResizePolicy
+from kubernetes_asyncio.client.models.v1_container_restart_rule import V1ContainerRestartRule
+from kubernetes_asyncio.client.models.v1_container_restart_rule_on_exit_codes import V1ContainerRestartRuleOnExitCodes
+from kubernetes_asyncio.client.models.v1_container_state import V1ContainerState
+from kubernetes_asyncio.client.models.v1_container_state_running import V1ContainerStateRunning
+from kubernetes_asyncio.client.models.v1_container_state_terminated import V1ContainerStateTerminated
+from kubernetes_asyncio.client.models.v1_container_state_waiting import V1ContainerStateWaiting
+from kubernetes_asyncio.client.models.v1_container_status import V1ContainerStatus
+from kubernetes_asyncio.client.models.v1_container_user import V1ContainerUser
+from kubernetes_asyncio.client.models.v1_controller_revision import V1ControllerRevision
+from kubernetes_asyncio.client.models.v1_controller_revision_list import V1ControllerRevisionList
+from kubernetes_asyncio.client.models.v1_counter import V1Counter
+from kubernetes_asyncio.client.models.v1_counter_set import V1CounterSet
+from kubernetes_asyncio.client.models.v1_cron_job import V1CronJob
+from kubernetes_asyncio.client.models.v1_cron_job_list import V1CronJobList
+from kubernetes_asyncio.client.models.v1_cron_job_spec import V1CronJobSpec
+from kubernetes_asyncio.client.models.v1_cron_job_status import V1CronJobStatus
+from kubernetes_asyncio.client.models.v1_cross_version_object_reference import V1CrossVersionObjectReference
+from kubernetes_asyncio.client.models.v1_custom_resource_column_definition import V1CustomResourceColumnDefinition
+from kubernetes_asyncio.client.models.v1_custom_resource_conversion import V1CustomResourceConversion
+from kubernetes_asyncio.client.models.v1_custom_resource_definition import V1CustomResourceDefinition
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_condition import V1CustomResourceDefinitionCondition
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_list import V1CustomResourceDefinitionList
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_names import V1CustomResourceDefinitionNames
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_spec import V1CustomResourceDefinitionSpec
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_status import V1CustomResourceDefinitionStatus
+from kubernetes_asyncio.client.models.v1_custom_resource_definition_version import V1CustomResourceDefinitionVersion
+from kubernetes_asyncio.client.models.v1_custom_resource_subresource_scale import V1CustomResourceSubresourceScale
+from kubernetes_asyncio.client.models.v1_custom_resource_subresources import V1CustomResourceSubresources
+from kubernetes_asyncio.client.models.v1_custom_resource_validation import V1CustomResourceValidation
+from kubernetes_asyncio.client.models.v1_daemon_endpoint import V1DaemonEndpoint
+from kubernetes_asyncio.client.models.v1_daemon_set import V1DaemonSet
+from kubernetes_asyncio.client.models.v1_daemon_set_condition import V1DaemonSetCondition
+from kubernetes_asyncio.client.models.v1_daemon_set_list import V1DaemonSetList
+from kubernetes_asyncio.client.models.v1_daemon_set_spec import V1DaemonSetSpec
+from kubernetes_asyncio.client.models.v1_daemon_set_status import V1DaemonSetStatus
+from kubernetes_asyncio.client.models.v1_daemon_set_update_strategy import V1DaemonSetUpdateStrategy
+from kubernetes_asyncio.client.models.v1_delete_options import V1DeleteOptions
+from kubernetes_asyncio.client.models.v1_deployment import V1Deployment
+from kubernetes_asyncio.client.models.v1_deployment_condition import V1DeploymentCondition
+from kubernetes_asyncio.client.models.v1_deployment_list import V1DeploymentList
+from kubernetes_asyncio.client.models.v1_deployment_spec import V1DeploymentSpec
+from kubernetes_asyncio.client.models.v1_deployment_status import V1DeploymentStatus
+from kubernetes_asyncio.client.models.v1_deployment_strategy import V1DeploymentStrategy
+from kubernetes_asyncio.client.models.v1_device import V1Device
+from kubernetes_asyncio.client.models.v1_device_allocation_configuration import V1DeviceAllocationConfiguration
+from kubernetes_asyncio.client.models.v1_device_allocation_result import V1DeviceAllocationResult
+from kubernetes_asyncio.client.models.v1_device_attribute import V1DeviceAttribute
+from kubernetes_asyncio.client.models.v1_device_capacity import V1DeviceCapacity
+from kubernetes_asyncio.client.models.v1_device_claim import V1DeviceClaim
+from kubernetes_asyncio.client.models.v1_device_claim_configuration import V1DeviceClaimConfiguration
+from kubernetes_asyncio.client.models.v1_device_class import V1DeviceClass
+from kubernetes_asyncio.client.models.v1_device_class_configuration import V1DeviceClassConfiguration
+from kubernetes_asyncio.client.models.v1_device_class_list import V1DeviceClassList
+from kubernetes_asyncio.client.models.v1_device_class_spec import V1DeviceClassSpec
+from kubernetes_asyncio.client.models.v1_device_constraint import V1DeviceConstraint
+from kubernetes_asyncio.client.models.v1_device_counter_consumption import V1DeviceCounterConsumption
+from kubernetes_asyncio.client.models.v1_device_request import V1DeviceRequest
+from kubernetes_asyncio.client.models.v1_device_request_allocation_result import V1DeviceRequestAllocationResult
+from kubernetes_asyncio.client.models.v1_device_selector import V1DeviceSelector
+from kubernetes_asyncio.client.models.v1_device_sub_request import V1DeviceSubRequest
+from kubernetes_asyncio.client.models.v1_device_taint import V1DeviceTaint
+from kubernetes_asyncio.client.models.v1_device_toleration import V1DeviceToleration
+from kubernetes_asyncio.client.models.v1_downward_api_projection import V1DownwardAPIProjection
+from kubernetes_asyncio.client.models.v1_downward_api_volume_file import V1DownwardAPIVolumeFile
+from kubernetes_asyncio.client.models.v1_downward_api_volume_source import V1DownwardAPIVolumeSource
+from kubernetes_asyncio.client.models.v1_empty_dir_volume_source import V1EmptyDirVolumeSource
+from kubernetes_asyncio.client.models.v1_endpoint import V1Endpoint
+from kubernetes_asyncio.client.models.v1_endpoint_address import V1EndpointAddress
+from kubernetes_asyncio.client.models.v1_endpoint_conditions import V1EndpointConditions
+from kubernetes_asyncio.client.models.v1_endpoint_hints import V1EndpointHints
+from kubernetes_asyncio.client.models.v1_endpoint_slice import V1EndpointSlice
+from kubernetes_asyncio.client.models.v1_endpoint_slice_list import V1EndpointSliceList
+from kubernetes_asyncio.client.models.v1_endpoint_subset import V1EndpointSubset
+from kubernetes_asyncio.client.models.v1_endpoints import V1Endpoints
+from kubernetes_asyncio.client.models.v1_endpoints_list import V1EndpointsList
+from kubernetes_asyncio.client.models.v1_env_from_source import V1EnvFromSource
+from kubernetes_asyncio.client.models.v1_env_var import V1EnvVar
+from kubernetes_asyncio.client.models.v1_env_var_source import V1EnvVarSource
+from kubernetes_asyncio.client.models.v1_ephemeral_container import V1EphemeralContainer
+from kubernetes_asyncio.client.models.v1_ephemeral_volume_source import V1EphemeralVolumeSource
+from kubernetes_asyncio.client.models.v1_event_source import V1EventSource
+from kubernetes_asyncio.client.models.v1_eviction import V1Eviction
+from kubernetes_asyncio.client.models.v1_exact_device_request import V1ExactDeviceRequest
+from kubernetes_asyncio.client.models.v1_exec_action import V1ExecAction
+from kubernetes_asyncio.client.models.v1_exempt_priority_level_configuration import V1ExemptPriorityLevelConfiguration
+from kubernetes_asyncio.client.models.v1_expression_warning import V1ExpressionWarning
+from kubernetes_asyncio.client.models.v1_external_documentation import V1ExternalDocumentation
+from kubernetes_asyncio.client.models.v1_fc_volume_source import V1FCVolumeSource
+from kubernetes_asyncio.client.models.v1_field_selector_attributes import V1FieldSelectorAttributes
+from kubernetes_asyncio.client.models.v1_field_selector_requirement import V1FieldSelectorRequirement
+from kubernetes_asyncio.client.models.v1_file_key_selector import V1FileKeySelector
+from kubernetes_asyncio.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_flex_volume_source import V1FlexVolumeSource
+from kubernetes_asyncio.client.models.v1_flocker_volume_source import V1FlockerVolumeSource
+from kubernetes_asyncio.client.models.v1_flow_distinguisher_method import V1FlowDistinguisherMethod
+from kubernetes_asyncio.client.models.v1_flow_schema import V1FlowSchema
+from kubernetes_asyncio.client.models.v1_flow_schema_condition import V1FlowSchemaCondition
+from kubernetes_asyncio.client.models.v1_flow_schema_list import V1FlowSchemaList
+from kubernetes_asyncio.client.models.v1_flow_schema_spec import V1FlowSchemaSpec
+from kubernetes_asyncio.client.models.v1_flow_schema_status import V1FlowSchemaStatus
+from kubernetes_asyncio.client.models.v1_for_node import V1ForNode
+from kubernetes_asyncio.client.models.v1_for_zone import V1ForZone
+from kubernetes_asyncio.client.models.v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource
+from kubernetes_asyncio.client.models.v1_grpc_action import V1GRPCAction
+from kubernetes_asyncio.client.models.v1_git_repo_volume_source import V1GitRepoVolumeSource
+from kubernetes_asyncio.client.models.v1_glusterfs_persistent_volume_source import V1GlusterfsPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_glusterfs_volume_source import V1GlusterfsVolumeSource
+from kubernetes_asyncio.client.models.v1_group_resource import V1GroupResource
+from kubernetes_asyncio.client.models.v1_group_subject import V1GroupSubject
+from kubernetes_asyncio.client.models.v1_group_version_for_discovery import V1GroupVersionForDiscovery
+from kubernetes_asyncio.client.models.v1_http_get_action import V1HTTPGetAction
+from kubernetes_asyncio.client.models.v1_http_header import V1HTTPHeader
+from kubernetes_asyncio.client.models.v1_http_ingress_path import V1HTTPIngressPath
+from kubernetes_asyncio.client.models.v1_http_ingress_rule_value import V1HTTPIngressRuleValue
+from kubernetes_asyncio.client.models.v1_horizontal_pod_autoscaler import V1HorizontalPodAutoscaler
+from kubernetes_asyncio.client.models.v1_horizontal_pod_autoscaler_list import V1HorizontalPodAutoscalerList
+from kubernetes_asyncio.client.models.v1_horizontal_pod_autoscaler_spec import V1HorizontalPodAutoscalerSpec
+from kubernetes_asyncio.client.models.v1_horizontal_pod_autoscaler_status import V1HorizontalPodAutoscalerStatus
+from kubernetes_asyncio.client.models.v1_host_alias import V1HostAlias
+from kubernetes_asyncio.client.models.v1_host_ip import V1HostIP
+from kubernetes_asyncio.client.models.v1_host_path_volume_source import V1HostPathVolumeSource
+from kubernetes_asyncio.client.models.v1_ip_address import V1IPAddress
+from kubernetes_asyncio.client.models.v1_ip_address_list import V1IPAddressList
+from kubernetes_asyncio.client.models.v1_ip_address_spec import V1IPAddressSpec
+from kubernetes_asyncio.client.models.v1_ip_block import V1IPBlock
+from kubernetes_asyncio.client.models.v1_iscsi_persistent_volume_source import V1ISCSIPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_iscsi_volume_source import V1ISCSIVolumeSource
+from kubernetes_asyncio.client.models.v1_image_volume_source import V1ImageVolumeSource
+from kubernetes_asyncio.client.models.v1_ingress import V1Ingress
+from kubernetes_asyncio.client.models.v1_ingress_backend import V1IngressBackend
+from kubernetes_asyncio.client.models.v1_ingress_class import V1IngressClass
+from kubernetes_asyncio.client.models.v1_ingress_class_list import V1IngressClassList
+from kubernetes_asyncio.client.models.v1_ingress_class_parameters_reference import V1IngressClassParametersReference
+from kubernetes_asyncio.client.models.v1_ingress_class_spec import V1IngressClassSpec
+from kubernetes_asyncio.client.models.v1_ingress_list import V1IngressList
+from kubernetes_asyncio.client.models.v1_ingress_load_balancer_ingress import V1IngressLoadBalancerIngress
+from kubernetes_asyncio.client.models.v1_ingress_load_balancer_status import V1IngressLoadBalancerStatus
+from kubernetes_asyncio.client.models.v1_ingress_port_status import V1IngressPortStatus
+from kubernetes_asyncio.client.models.v1_ingress_rule import V1IngressRule
+from kubernetes_asyncio.client.models.v1_ingress_service_backend import V1IngressServiceBackend
+from kubernetes_asyncio.client.models.v1_ingress_spec import V1IngressSpec
+from kubernetes_asyncio.client.models.v1_ingress_status import V1IngressStatus
+from kubernetes_asyncio.client.models.v1_ingress_tls import V1IngressTLS
+from kubernetes_asyncio.client.models.v1_json_schema_props import V1JSONSchemaProps
+from kubernetes_asyncio.client.models.v1_job import V1Job
+from kubernetes_asyncio.client.models.v1_job_condition import V1JobCondition
+from kubernetes_asyncio.client.models.v1_job_list import V1JobList
+from kubernetes_asyncio.client.models.v1_job_spec import V1JobSpec
+from kubernetes_asyncio.client.models.v1_job_status import V1JobStatus
+from kubernetes_asyncio.client.models.v1_job_template_spec import V1JobTemplateSpec
+from kubernetes_asyncio.client.models.v1_key_to_path import V1KeyToPath
+from kubernetes_asyncio.client.models.v1_label_selector import V1LabelSelector
+from kubernetes_asyncio.client.models.v1_label_selector_attributes import V1LabelSelectorAttributes
+from kubernetes_asyncio.client.models.v1_label_selector_requirement import V1LabelSelectorRequirement
+from kubernetes_asyncio.client.models.v1_lease import V1Lease
+from kubernetes_asyncio.client.models.v1_lease_list import V1LeaseList
+from kubernetes_asyncio.client.models.v1_lease_spec import V1LeaseSpec
+from kubernetes_asyncio.client.models.v1_lifecycle import V1Lifecycle
+from kubernetes_asyncio.client.models.v1_lifecycle_handler import V1LifecycleHandler
+from kubernetes_asyncio.client.models.v1_limit_range import V1LimitRange
+from kubernetes_asyncio.client.models.v1_limit_range_item import V1LimitRangeItem
+from kubernetes_asyncio.client.models.v1_limit_range_list import V1LimitRangeList
+from kubernetes_asyncio.client.models.v1_limit_range_spec import V1LimitRangeSpec
+from kubernetes_asyncio.client.models.v1_limit_response import V1LimitResponse
+from kubernetes_asyncio.client.models.v1_limited_priority_level_configuration import V1LimitedPriorityLevelConfiguration
+from kubernetes_asyncio.client.models.v1_linux_container_user import V1LinuxContainerUser
+from kubernetes_asyncio.client.models.v1_list_meta import V1ListMeta
+from kubernetes_asyncio.client.models.v1_load_balancer_ingress import V1LoadBalancerIngress
+from kubernetes_asyncio.client.models.v1_load_balancer_status import V1LoadBalancerStatus
+from kubernetes_asyncio.client.models.v1_local_object_reference import V1LocalObjectReference
+from kubernetes_asyncio.client.models.v1_local_subject_access_review import V1LocalSubjectAccessReview
+from kubernetes_asyncio.client.models.v1_local_volume_source import V1LocalVolumeSource
+from kubernetes_asyncio.client.models.v1_managed_fields_entry import V1ManagedFieldsEntry
+from kubernetes_asyncio.client.models.v1_match_condition import V1MatchCondition
+from kubernetes_asyncio.client.models.v1_match_resources import V1MatchResources
+from kubernetes_asyncio.client.models.v1_modify_volume_status import V1ModifyVolumeStatus
+from kubernetes_asyncio.client.models.v1_mutating_webhook import V1MutatingWebhook
+from kubernetes_asyncio.client.models.v1_mutating_webhook_configuration import V1MutatingWebhookConfiguration
+from kubernetes_asyncio.client.models.v1_mutating_webhook_configuration_list import V1MutatingWebhookConfigurationList
+from kubernetes_asyncio.client.models.v1_nfs_volume_source import V1NFSVolumeSource
+from kubernetes_asyncio.client.models.v1_named_rule_with_operations import V1NamedRuleWithOperations
+from kubernetes_asyncio.client.models.v1_namespace import V1Namespace
+from kubernetes_asyncio.client.models.v1_namespace_condition import V1NamespaceCondition
+from kubernetes_asyncio.client.models.v1_namespace_list import V1NamespaceList
+from kubernetes_asyncio.client.models.v1_namespace_spec import V1NamespaceSpec
+from kubernetes_asyncio.client.models.v1_namespace_status import V1NamespaceStatus
+from kubernetes_asyncio.client.models.v1_network_device_data import V1NetworkDeviceData
+from kubernetes_asyncio.client.models.v1_network_policy import V1NetworkPolicy
+from kubernetes_asyncio.client.models.v1_network_policy_egress_rule import V1NetworkPolicyEgressRule
+from kubernetes_asyncio.client.models.v1_network_policy_ingress_rule import V1NetworkPolicyIngressRule
+from kubernetes_asyncio.client.models.v1_network_policy_list import V1NetworkPolicyList
+from kubernetes_asyncio.client.models.v1_network_policy_peer import V1NetworkPolicyPeer
+from kubernetes_asyncio.client.models.v1_network_policy_port import V1NetworkPolicyPort
+from kubernetes_asyncio.client.models.v1_network_policy_spec import V1NetworkPolicySpec
+from kubernetes_asyncio.client.models.v1_node import V1Node
+from kubernetes_asyncio.client.models.v1_node_address import V1NodeAddress
+from kubernetes_asyncio.client.models.v1_node_affinity import V1NodeAffinity
+from kubernetes_asyncio.client.models.v1_node_condition import V1NodeCondition
+from kubernetes_asyncio.client.models.v1_node_config_source import V1NodeConfigSource
+from kubernetes_asyncio.client.models.v1_node_config_status import V1NodeConfigStatus
+from kubernetes_asyncio.client.models.v1_node_daemon_endpoints import V1NodeDaemonEndpoints
+from kubernetes_asyncio.client.models.v1_node_features import V1NodeFeatures
+from kubernetes_asyncio.client.models.v1_node_list import V1NodeList
+from kubernetes_asyncio.client.models.v1_node_runtime_handler import V1NodeRuntimeHandler
+from kubernetes_asyncio.client.models.v1_node_runtime_handler_features import V1NodeRuntimeHandlerFeatures
+from kubernetes_asyncio.client.models.v1_node_selector import V1NodeSelector
+from kubernetes_asyncio.client.models.v1_node_selector_requirement import V1NodeSelectorRequirement
+from kubernetes_asyncio.client.models.v1_node_selector_term import V1NodeSelectorTerm
+from kubernetes_asyncio.client.models.v1_node_spec import V1NodeSpec
+from kubernetes_asyncio.client.models.v1_node_status import V1NodeStatus
+from kubernetes_asyncio.client.models.v1_node_swap_status import V1NodeSwapStatus
+from kubernetes_asyncio.client.models.v1_node_system_info import V1NodeSystemInfo
+from kubernetes_asyncio.client.models.v1_non_resource_attributes import V1NonResourceAttributes
+from kubernetes_asyncio.client.models.v1_non_resource_policy_rule import V1NonResourcePolicyRule
+from kubernetes_asyncio.client.models.v1_non_resource_rule import V1NonResourceRule
+from kubernetes_asyncio.client.models.v1_object_field_selector import V1ObjectFieldSelector
+from kubernetes_asyncio.client.models.v1_object_meta import V1ObjectMeta
+from kubernetes_asyncio.client.models.v1_object_reference import V1ObjectReference
+from kubernetes_asyncio.client.models.v1_opaque_device_configuration import V1OpaqueDeviceConfiguration
+from kubernetes_asyncio.client.models.v1_overhead import V1Overhead
+from kubernetes_asyncio.client.models.v1_owner_reference import V1OwnerReference
+from kubernetes_asyncio.client.models.v1_param_kind import V1ParamKind
+from kubernetes_asyncio.client.models.v1_param_ref import V1ParamRef
+from kubernetes_asyncio.client.models.v1_parent_reference import V1ParentReference
+from kubernetes_asyncio.client.models.v1_persistent_volume import V1PersistentVolume
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim import V1PersistentVolumeClaim
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_condition import V1PersistentVolumeClaimCondition
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_list import V1PersistentVolumeClaimList
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_spec import V1PersistentVolumeClaimSpec
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_status import V1PersistentVolumeClaimStatus
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_template import V1PersistentVolumeClaimTemplate
+from kubernetes_asyncio.client.models.v1_persistent_volume_claim_volume_source import V1PersistentVolumeClaimVolumeSource
+from kubernetes_asyncio.client.models.v1_persistent_volume_list import V1PersistentVolumeList
+from kubernetes_asyncio.client.models.v1_persistent_volume_spec import V1PersistentVolumeSpec
+from kubernetes_asyncio.client.models.v1_persistent_volume_status import V1PersistentVolumeStatus
+from kubernetes_asyncio.client.models.v1_photon_persistent_disk_volume_source import V1PhotonPersistentDiskVolumeSource
+from kubernetes_asyncio.client.models.v1_pod import V1Pod
+from kubernetes_asyncio.client.models.v1_pod_affinity import V1PodAffinity
+from kubernetes_asyncio.client.models.v1_pod_affinity_term import V1PodAffinityTerm
+from kubernetes_asyncio.client.models.v1_pod_anti_affinity import V1PodAntiAffinity
+from kubernetes_asyncio.client.models.v1_pod_certificate_projection import V1PodCertificateProjection
+from kubernetes_asyncio.client.models.v1_pod_condition import V1PodCondition
+from kubernetes_asyncio.client.models.v1_pod_dns_config import V1PodDNSConfig
+from kubernetes_asyncio.client.models.v1_pod_dns_config_option import V1PodDNSConfigOption
+from kubernetes_asyncio.client.models.v1_pod_disruption_budget import V1PodDisruptionBudget
+from kubernetes_asyncio.client.models.v1_pod_disruption_budget_list import V1PodDisruptionBudgetList
+from kubernetes_asyncio.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec
+from kubernetes_asyncio.client.models.v1_pod_disruption_budget_status import V1PodDisruptionBudgetStatus
+from kubernetes_asyncio.client.models.v1_pod_extended_resource_claim_status import V1PodExtendedResourceClaimStatus
+from kubernetes_asyncio.client.models.v1_pod_failure_policy import V1PodFailurePolicy
+from kubernetes_asyncio.client.models.v1_pod_failure_policy_on_exit_codes_requirement import V1PodFailurePolicyOnExitCodesRequirement
+from kubernetes_asyncio.client.models.v1_pod_failure_policy_on_pod_conditions_pattern import V1PodFailurePolicyOnPodConditionsPattern
+from kubernetes_asyncio.client.models.v1_pod_failure_policy_rule import V1PodFailurePolicyRule
+from kubernetes_asyncio.client.models.v1_pod_ip import V1PodIP
+from kubernetes_asyncio.client.models.v1_pod_list import V1PodList
+from kubernetes_asyncio.client.models.v1_pod_os import V1PodOS
+from kubernetes_asyncio.client.models.v1_pod_readiness_gate import V1PodReadinessGate
+from kubernetes_asyncio.client.models.v1_pod_resource_claim import V1PodResourceClaim
+from kubernetes_asyncio.client.models.v1_pod_resource_claim_status import V1PodResourceClaimStatus
+from kubernetes_asyncio.client.models.v1_pod_scheduling_gate import V1PodSchedulingGate
+from kubernetes_asyncio.client.models.v1_pod_security_context import V1PodSecurityContext
+from kubernetes_asyncio.client.models.v1_pod_spec import V1PodSpec
+from kubernetes_asyncio.client.models.v1_pod_status import V1PodStatus
+from kubernetes_asyncio.client.models.v1_pod_template import V1PodTemplate
+from kubernetes_asyncio.client.models.v1_pod_template_list import V1PodTemplateList
+from kubernetes_asyncio.client.models.v1_pod_template_spec import V1PodTemplateSpec
+from kubernetes_asyncio.client.models.v1_policy_rule import V1PolicyRule
+from kubernetes_asyncio.client.models.v1_policy_rules_with_subjects import V1PolicyRulesWithSubjects
+from kubernetes_asyncio.client.models.v1_port_status import V1PortStatus
+from kubernetes_asyncio.client.models.v1_portworx_volume_source import V1PortworxVolumeSource
+from kubernetes_asyncio.client.models.v1_preconditions import V1Preconditions
+from kubernetes_asyncio.client.models.v1_preferred_scheduling_term import V1PreferredSchedulingTerm
+from kubernetes_asyncio.client.models.v1_priority_class import V1PriorityClass
+from kubernetes_asyncio.client.models.v1_priority_class_list import V1PriorityClassList
+from kubernetes_asyncio.client.models.v1_priority_level_configuration import V1PriorityLevelConfiguration
+from kubernetes_asyncio.client.models.v1_priority_level_configuration_condition import V1PriorityLevelConfigurationCondition
+from kubernetes_asyncio.client.models.v1_priority_level_configuration_list import V1PriorityLevelConfigurationList
+from kubernetes_asyncio.client.models.v1_priority_level_configuration_reference import V1PriorityLevelConfigurationReference
+from kubernetes_asyncio.client.models.v1_priority_level_configuration_spec import V1PriorityLevelConfigurationSpec
+from kubernetes_asyncio.client.models.v1_priority_level_configuration_status import V1PriorityLevelConfigurationStatus
+from kubernetes_asyncio.client.models.v1_probe import V1Probe
+from kubernetes_asyncio.client.models.v1_projected_volume_source import V1ProjectedVolumeSource
+from kubernetes_asyncio.client.models.v1_queuing_configuration import V1QueuingConfiguration
+from kubernetes_asyncio.client.models.v1_quobyte_volume_source import V1QuobyteVolumeSource
+from kubernetes_asyncio.client.models.v1_rbd_persistent_volume_source import V1RBDPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_rbd_volume_source import V1RBDVolumeSource
+from kubernetes_asyncio.client.models.v1_replica_set import V1ReplicaSet
+from kubernetes_asyncio.client.models.v1_replica_set_condition import V1ReplicaSetCondition
+from kubernetes_asyncio.client.models.v1_replica_set_list import V1ReplicaSetList
+from kubernetes_asyncio.client.models.v1_replica_set_spec import V1ReplicaSetSpec
+from kubernetes_asyncio.client.models.v1_replica_set_status import V1ReplicaSetStatus
+from kubernetes_asyncio.client.models.v1_replication_controller import V1ReplicationController
+from kubernetes_asyncio.client.models.v1_replication_controller_condition import V1ReplicationControllerCondition
+from kubernetes_asyncio.client.models.v1_replication_controller_list import V1ReplicationControllerList
+from kubernetes_asyncio.client.models.v1_replication_controller_spec import V1ReplicationControllerSpec
+from kubernetes_asyncio.client.models.v1_replication_controller_status import V1ReplicationControllerStatus
+from kubernetes_asyncio.client.models.v1_resource_attributes import V1ResourceAttributes
+from kubernetes_asyncio.client.models.v1_resource_claim_consumer_reference import V1ResourceClaimConsumerReference
+from kubernetes_asyncio.client.models.v1_resource_claim_list import V1ResourceClaimList
+from kubernetes_asyncio.client.models.v1_resource_claim_spec import V1ResourceClaimSpec
+from kubernetes_asyncio.client.models.v1_resource_claim_status import V1ResourceClaimStatus
+from kubernetes_asyncio.client.models.v1_resource_claim_template import V1ResourceClaimTemplate
+from kubernetes_asyncio.client.models.v1_resource_claim_template_list import V1ResourceClaimTemplateList
+from kubernetes_asyncio.client.models.v1_resource_claim_template_spec import V1ResourceClaimTemplateSpec
+from kubernetes_asyncio.client.models.v1_resource_field_selector import V1ResourceFieldSelector
+from kubernetes_asyncio.client.models.v1_resource_health import V1ResourceHealth
+from kubernetes_asyncio.client.models.v1_resource_policy_rule import V1ResourcePolicyRule
+from kubernetes_asyncio.client.models.v1_resource_pool import V1ResourcePool
+from kubernetes_asyncio.client.models.v1_resource_quota import V1ResourceQuota
+from kubernetes_asyncio.client.models.v1_resource_quota_list import V1ResourceQuotaList
+from kubernetes_asyncio.client.models.v1_resource_quota_spec import V1ResourceQuotaSpec
+from kubernetes_asyncio.client.models.v1_resource_quota_status import V1ResourceQuotaStatus
+from kubernetes_asyncio.client.models.v1_resource_requirements import V1ResourceRequirements
+from kubernetes_asyncio.client.models.v1_resource_rule import V1ResourceRule
+from kubernetes_asyncio.client.models.v1_resource_slice import V1ResourceSlice
+from kubernetes_asyncio.client.models.v1_resource_slice_list import V1ResourceSliceList
+from kubernetes_asyncio.client.models.v1_resource_slice_spec import V1ResourceSliceSpec
+from kubernetes_asyncio.client.models.v1_resource_status import V1ResourceStatus
+from kubernetes_asyncio.client.models.v1_role import V1Role
+from kubernetes_asyncio.client.models.v1_role_binding import V1RoleBinding
+from kubernetes_asyncio.client.models.v1_role_binding_list import V1RoleBindingList
+from kubernetes_asyncio.client.models.v1_role_list import V1RoleList
+from kubernetes_asyncio.client.models.v1_role_ref import V1RoleRef
+from kubernetes_asyncio.client.models.v1_rolling_update_daemon_set import V1RollingUpdateDaemonSet
+from kubernetes_asyncio.client.models.v1_rolling_update_deployment import V1RollingUpdateDeployment
+from kubernetes_asyncio.client.models.v1_rolling_update_stateful_set_strategy import V1RollingUpdateStatefulSetStrategy
+from kubernetes_asyncio.client.models.v1_rule_with_operations import V1RuleWithOperations
+from kubernetes_asyncio.client.models.v1_runtime_class import V1RuntimeClass
+from kubernetes_asyncio.client.models.v1_runtime_class_list import V1RuntimeClassList
+from kubernetes_asyncio.client.models.v1_se_linux_options import V1SELinuxOptions
+from kubernetes_asyncio.client.models.v1_scale import V1Scale
+from kubernetes_asyncio.client.models.v1_scale_io_persistent_volume_source import V1ScaleIOPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_scale_io_volume_source import V1ScaleIOVolumeSource
+from kubernetes_asyncio.client.models.v1_scale_spec import V1ScaleSpec
+from kubernetes_asyncio.client.models.v1_scale_status import V1ScaleStatus
+from kubernetes_asyncio.client.models.v1_scheduling import V1Scheduling
+from kubernetes_asyncio.client.models.v1_scope_selector import V1ScopeSelector
+from kubernetes_asyncio.client.models.v1_scoped_resource_selector_requirement import V1ScopedResourceSelectorRequirement
+from kubernetes_asyncio.client.models.v1_seccomp_profile import V1SeccompProfile
+from kubernetes_asyncio.client.models.v1_secret import V1Secret
+from kubernetes_asyncio.client.models.v1_secret_env_source import V1SecretEnvSource
+from kubernetes_asyncio.client.models.v1_secret_key_selector import V1SecretKeySelector
+from kubernetes_asyncio.client.models.v1_secret_list import V1SecretList
+from kubernetes_asyncio.client.models.v1_secret_projection import V1SecretProjection
+from kubernetes_asyncio.client.models.v1_secret_reference import V1SecretReference
+from kubernetes_asyncio.client.models.v1_secret_volume_source import V1SecretVolumeSource
+from kubernetes_asyncio.client.models.v1_security_context import V1SecurityContext
+from kubernetes_asyncio.client.models.v1_selectable_field import V1SelectableField
+from kubernetes_asyncio.client.models.v1_self_subject_access_review import V1SelfSubjectAccessReview
+from kubernetes_asyncio.client.models.v1_self_subject_access_review_spec import V1SelfSubjectAccessReviewSpec
+from kubernetes_asyncio.client.models.v1_self_subject_review import V1SelfSubjectReview
+from kubernetes_asyncio.client.models.v1_self_subject_review_status import V1SelfSubjectReviewStatus
+from kubernetes_asyncio.client.models.v1_self_subject_rules_review import V1SelfSubjectRulesReview
+from kubernetes_asyncio.client.models.v1_self_subject_rules_review_spec import V1SelfSubjectRulesReviewSpec
+from kubernetes_asyncio.client.models.v1_server_address_by_client_cidr import V1ServerAddressByClientCIDR
+from kubernetes_asyncio.client.models.v1_service import V1Service
+from kubernetes_asyncio.client.models.v1_service_account import V1ServiceAccount
+from kubernetes_asyncio.client.models.v1_service_account_list import V1ServiceAccountList
+from kubernetes_asyncio.client.models.v1_service_account_subject import V1ServiceAccountSubject
+from kubernetes_asyncio.client.models.v1_service_account_token_projection import V1ServiceAccountTokenProjection
+from kubernetes_asyncio.client.models.v1_service_backend_port import V1ServiceBackendPort
+from kubernetes_asyncio.client.models.v1_service_cidr import V1ServiceCIDR
+from kubernetes_asyncio.client.models.v1_service_cidr_list import V1ServiceCIDRList
+from kubernetes_asyncio.client.models.v1_service_cidr_spec import V1ServiceCIDRSpec
+from kubernetes_asyncio.client.models.v1_service_cidr_status import V1ServiceCIDRStatus
+from kubernetes_asyncio.client.models.v1_service_list import V1ServiceList
+from kubernetes_asyncio.client.models.v1_service_port import V1ServicePort
+from kubernetes_asyncio.client.models.v1_service_spec import V1ServiceSpec
+from kubernetes_asyncio.client.models.v1_service_status import V1ServiceStatus
+from kubernetes_asyncio.client.models.v1_session_affinity_config import V1SessionAffinityConfig
+from kubernetes_asyncio.client.models.v1_sleep_action import V1SleepAction
+from kubernetes_asyncio.client.models.v1_stateful_set import V1StatefulSet
+from kubernetes_asyncio.client.models.v1_stateful_set_condition import V1StatefulSetCondition
+from kubernetes_asyncio.client.models.v1_stateful_set_list import V1StatefulSetList
+from kubernetes_asyncio.client.models.v1_stateful_set_ordinals import V1StatefulSetOrdinals
+from kubernetes_asyncio.client.models.v1_stateful_set_persistent_volume_claim_retention_policy import V1StatefulSetPersistentVolumeClaimRetentionPolicy
+from kubernetes_asyncio.client.models.v1_stateful_set_spec import V1StatefulSetSpec
+from kubernetes_asyncio.client.models.v1_stateful_set_status import V1StatefulSetStatus
+from kubernetes_asyncio.client.models.v1_stateful_set_update_strategy import V1StatefulSetUpdateStrategy
+from kubernetes_asyncio.client.models.v1_status import V1Status
+from kubernetes_asyncio.client.models.v1_status_cause import V1StatusCause
+from kubernetes_asyncio.client.models.v1_status_details import V1StatusDetails
+from kubernetes_asyncio.client.models.v1_storage_class import V1StorageClass
+from kubernetes_asyncio.client.models.v1_storage_class_list import V1StorageClassList
+from kubernetes_asyncio.client.models.v1_storage_os_persistent_volume_source import V1StorageOSPersistentVolumeSource
+from kubernetes_asyncio.client.models.v1_storage_os_volume_source import V1StorageOSVolumeSource
+from kubernetes_asyncio.client.models.v1_subject_access_review import V1SubjectAccessReview
+from kubernetes_asyncio.client.models.v1_subject_access_review_spec import V1SubjectAccessReviewSpec
+from kubernetes_asyncio.client.models.v1_subject_access_review_status import V1SubjectAccessReviewStatus
+from kubernetes_asyncio.client.models.v1_subject_rules_review_status import V1SubjectRulesReviewStatus
+from kubernetes_asyncio.client.models.v1_success_policy import V1SuccessPolicy
+from kubernetes_asyncio.client.models.v1_success_policy_rule import V1SuccessPolicyRule
+from kubernetes_asyncio.client.models.v1_sysctl import V1Sysctl
+from kubernetes_asyncio.client.models.v1_tcp_socket_action import V1TCPSocketAction
+from kubernetes_asyncio.client.models.v1_taint import V1Taint
+from kubernetes_asyncio.client.models.v1_token_request_spec import V1TokenRequestSpec
+from kubernetes_asyncio.client.models.v1_token_request_status import V1TokenRequestStatus
+from kubernetes_asyncio.client.models.v1_token_review import V1TokenReview
+from kubernetes_asyncio.client.models.v1_token_review_spec import V1TokenReviewSpec
+from kubernetes_asyncio.client.models.v1_token_review_status import V1TokenReviewStatus
+from kubernetes_asyncio.client.models.v1_toleration import V1Toleration
+from kubernetes_asyncio.client.models.v1_topology_selector_label_requirement import V1TopologySelectorLabelRequirement
+from kubernetes_asyncio.client.models.v1_topology_selector_term import V1TopologySelectorTerm
+from kubernetes_asyncio.client.models.v1_topology_spread_constraint import V1TopologySpreadConstraint
+from kubernetes_asyncio.client.models.v1_type_checking import V1TypeChecking
+from kubernetes_asyncio.client.models.v1_typed_local_object_reference import V1TypedLocalObjectReference
+from kubernetes_asyncio.client.models.v1_typed_object_reference import V1TypedObjectReference
+from kubernetes_asyncio.client.models.v1_uncounted_terminated_pods import V1UncountedTerminatedPods
+from kubernetes_asyncio.client.models.v1_user_info import V1UserInfo
+from kubernetes_asyncio.client.models.v1_user_subject import V1UserSubject
+from kubernetes_asyncio.client.models.v1_validating_admission_policy import V1ValidatingAdmissionPolicy
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_binding import V1ValidatingAdmissionPolicyBinding
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_binding_list import V1ValidatingAdmissionPolicyBindingList
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_binding_spec import V1ValidatingAdmissionPolicyBindingSpec
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_list import V1ValidatingAdmissionPolicyList
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_spec import V1ValidatingAdmissionPolicySpec
+from kubernetes_asyncio.client.models.v1_validating_admission_policy_status import V1ValidatingAdmissionPolicyStatus
+from kubernetes_asyncio.client.models.v1_validating_webhook import V1ValidatingWebhook
+from kubernetes_asyncio.client.models.v1_validating_webhook_configuration import V1ValidatingWebhookConfiguration
+from kubernetes_asyncio.client.models.v1_validating_webhook_configuration_list import V1ValidatingWebhookConfigurationList
+from kubernetes_asyncio.client.models.v1_validation import V1Validation
+from kubernetes_asyncio.client.models.v1_validation_rule import V1ValidationRule
+from kubernetes_asyncio.client.models.v1_variable import V1Variable
+from kubernetes_asyncio.client.models.v1_volume import V1Volume
+from kubernetes_asyncio.client.models.v1_volume_attachment import V1VolumeAttachment
+from kubernetes_asyncio.client.models.v1_volume_attachment_list import V1VolumeAttachmentList
+from kubernetes_asyncio.client.models.v1_volume_attachment_source import V1VolumeAttachmentSource
+from kubernetes_asyncio.client.models.v1_volume_attachment_spec import V1VolumeAttachmentSpec
+from kubernetes_asyncio.client.models.v1_volume_attachment_status import V1VolumeAttachmentStatus
+from kubernetes_asyncio.client.models.v1_volume_attributes_class import V1VolumeAttributesClass
+from kubernetes_asyncio.client.models.v1_volume_attributes_class_list import V1VolumeAttributesClassList
+from kubernetes_asyncio.client.models.v1_volume_device import V1VolumeDevice
+from kubernetes_asyncio.client.models.v1_volume_error import V1VolumeError
+from kubernetes_asyncio.client.models.v1_volume_mount import V1VolumeMount
+from kubernetes_asyncio.client.models.v1_volume_mount_status import V1VolumeMountStatus
+from kubernetes_asyncio.client.models.v1_volume_node_affinity import V1VolumeNodeAffinity
+from kubernetes_asyncio.client.models.v1_volume_node_resources import V1VolumeNodeResources
+from kubernetes_asyncio.client.models.v1_volume_projection import V1VolumeProjection
+from kubernetes_asyncio.client.models.v1_volume_resource_requirements import V1VolumeResourceRequirements
+from kubernetes_asyncio.client.models.v1_vsphere_virtual_disk_volume_source import V1VsphereVirtualDiskVolumeSource
+from kubernetes_asyncio.client.models.v1_watch_event import V1WatchEvent
+from kubernetes_asyncio.client.models.v1_webhook_conversion import V1WebhookConversion
+from kubernetes_asyncio.client.models.v1_weighted_pod_affinity_term import V1WeightedPodAffinityTerm
+from kubernetes_asyncio.client.models.v1_windows_security_context_options import V1WindowsSecurityContextOptions
+from kubernetes_asyncio.client.models.v1_workload_reference import V1WorkloadReference
+from kubernetes_asyncio.client.models.v1alpha1_apply_configuration import V1alpha1ApplyConfiguration
+from kubernetes_asyncio.client.models.v1alpha1_cluster_trust_bundle import V1alpha1ClusterTrustBundle
+from kubernetes_asyncio.client.models.v1alpha1_cluster_trust_bundle_list import V1alpha1ClusterTrustBundleList
+from kubernetes_asyncio.client.models.v1alpha1_cluster_trust_bundle_spec import V1alpha1ClusterTrustBundleSpec
+from kubernetes_asyncio.client.models.v1alpha1_gang_scheduling_policy import V1alpha1GangSchedulingPolicy
+from kubernetes_asyncio.client.models.v1alpha1_json_patch import V1alpha1JSONPatch
+from kubernetes_asyncio.client.models.v1alpha1_match_condition import V1alpha1MatchCondition
+from kubernetes_asyncio.client.models.v1alpha1_match_resources import V1alpha1MatchResources
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy import V1alpha1MutatingAdmissionPolicy
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy_binding import V1alpha1MutatingAdmissionPolicyBinding
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy_binding_list import V1alpha1MutatingAdmissionPolicyBindingList
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy_binding_spec import V1alpha1MutatingAdmissionPolicyBindingSpec
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy_list import V1alpha1MutatingAdmissionPolicyList
+from kubernetes_asyncio.client.models.v1alpha1_mutating_admission_policy_spec import V1alpha1MutatingAdmissionPolicySpec
+from kubernetes_asyncio.client.models.v1alpha1_mutation import V1alpha1Mutation
+from kubernetes_asyncio.client.models.v1alpha1_named_rule_with_operations import V1alpha1NamedRuleWithOperations
+from kubernetes_asyncio.client.models.v1alpha1_param_kind import V1alpha1ParamKind
+from kubernetes_asyncio.client.models.v1alpha1_param_ref import V1alpha1ParamRef
+from kubernetes_asyncio.client.models.v1alpha1_pod_group import V1alpha1PodGroup
+from kubernetes_asyncio.client.models.v1alpha1_pod_group_policy import V1alpha1PodGroupPolicy
+from kubernetes_asyncio.client.models.v1alpha1_server_storage_version import V1alpha1ServerStorageVersion
+from kubernetes_asyncio.client.models.v1alpha1_storage_version import V1alpha1StorageVersion
+from kubernetes_asyncio.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition
+from kubernetes_asyncio.client.models.v1alpha1_storage_version_list import V1alpha1StorageVersionList
+from kubernetes_asyncio.client.models.v1alpha1_storage_version_status import V1alpha1StorageVersionStatus
+from kubernetes_asyncio.client.models.v1alpha1_typed_local_object_reference import V1alpha1TypedLocalObjectReference
+from kubernetes_asyncio.client.models.v1alpha1_variable import V1alpha1Variable
+from kubernetes_asyncio.client.models.v1alpha1_workload import V1alpha1Workload
+from kubernetes_asyncio.client.models.v1alpha1_workload_list import V1alpha1WorkloadList
+from kubernetes_asyncio.client.models.v1alpha1_workload_spec import V1alpha1WorkloadSpec
+from kubernetes_asyncio.client.models.v1alpha2_lease_candidate import V1alpha2LeaseCandidate
+from kubernetes_asyncio.client.models.v1alpha2_lease_candidate_list import V1alpha2LeaseCandidateList
+from kubernetes_asyncio.client.models.v1alpha2_lease_candidate_spec import V1alpha2LeaseCandidateSpec
+from kubernetes_asyncio.client.models.v1alpha3_device_taint import V1alpha3DeviceTaint
+from kubernetes_asyncio.client.models.v1alpha3_device_taint_rule import V1alpha3DeviceTaintRule
+from kubernetes_asyncio.client.models.v1alpha3_device_taint_rule_list import V1alpha3DeviceTaintRuleList
+from kubernetes_asyncio.client.models.v1alpha3_device_taint_rule_spec import V1alpha3DeviceTaintRuleSpec
+from kubernetes_asyncio.client.models.v1alpha3_device_taint_rule_status import V1alpha3DeviceTaintRuleStatus
+from kubernetes_asyncio.client.models.v1alpha3_device_taint_selector import V1alpha3DeviceTaintSelector
+from kubernetes_asyncio.client.models.v1beta1_allocated_device_status import V1beta1AllocatedDeviceStatus
+from kubernetes_asyncio.client.models.v1beta1_allocation_result import V1beta1AllocationResult
+from kubernetes_asyncio.client.models.v1beta1_apply_configuration import V1beta1ApplyConfiguration
+from kubernetes_asyncio.client.models.v1beta1_basic_device import V1beta1BasicDevice
+from kubernetes_asyncio.client.models.v1beta1_cel_device_selector import V1beta1CELDeviceSelector
+from kubernetes_asyncio.client.models.v1beta1_capacity_request_policy import V1beta1CapacityRequestPolicy
+from kubernetes_asyncio.client.models.v1beta1_capacity_request_policy_range import V1beta1CapacityRequestPolicyRange
+from kubernetes_asyncio.client.models.v1beta1_capacity_requirements import V1beta1CapacityRequirements
+from kubernetes_asyncio.client.models.v1beta1_cluster_trust_bundle import V1beta1ClusterTrustBundle
+from kubernetes_asyncio.client.models.v1beta1_cluster_trust_bundle_list import V1beta1ClusterTrustBundleList
+from kubernetes_asyncio.client.models.v1beta1_cluster_trust_bundle_spec import V1beta1ClusterTrustBundleSpec
+from kubernetes_asyncio.client.models.v1beta1_counter import V1beta1Counter
+from kubernetes_asyncio.client.models.v1beta1_counter_set import V1beta1CounterSet
+from kubernetes_asyncio.client.models.v1beta1_device import V1beta1Device
+from kubernetes_asyncio.client.models.v1beta1_device_allocation_configuration import V1beta1DeviceAllocationConfiguration
+from kubernetes_asyncio.client.models.v1beta1_device_allocation_result import V1beta1DeviceAllocationResult
+from kubernetes_asyncio.client.models.v1beta1_device_attribute import V1beta1DeviceAttribute
+from kubernetes_asyncio.client.models.v1beta1_device_capacity import V1beta1DeviceCapacity
+from kubernetes_asyncio.client.models.v1beta1_device_claim import V1beta1DeviceClaim
+from kubernetes_asyncio.client.models.v1beta1_device_claim_configuration import V1beta1DeviceClaimConfiguration
+from kubernetes_asyncio.client.models.v1beta1_device_class import V1beta1DeviceClass
+from kubernetes_asyncio.client.models.v1beta1_device_class_configuration import V1beta1DeviceClassConfiguration
+from kubernetes_asyncio.client.models.v1beta1_device_class_list import V1beta1DeviceClassList
+from kubernetes_asyncio.client.models.v1beta1_device_class_spec import V1beta1DeviceClassSpec
+from kubernetes_asyncio.client.models.v1beta1_device_constraint import V1beta1DeviceConstraint
+from kubernetes_asyncio.client.models.v1beta1_device_counter_consumption import V1beta1DeviceCounterConsumption
+from kubernetes_asyncio.client.models.v1beta1_device_request import V1beta1DeviceRequest
+from kubernetes_asyncio.client.models.v1beta1_device_request_allocation_result import V1beta1DeviceRequestAllocationResult
+from kubernetes_asyncio.client.models.v1beta1_device_selector import V1beta1DeviceSelector
+from kubernetes_asyncio.client.models.v1beta1_device_sub_request import V1beta1DeviceSubRequest
+from kubernetes_asyncio.client.models.v1beta1_device_taint import V1beta1DeviceTaint
+from kubernetes_asyncio.client.models.v1beta1_device_toleration import V1beta1DeviceToleration
+from kubernetes_asyncio.client.models.v1beta1_ip_address import V1beta1IPAddress
+from kubernetes_asyncio.client.models.v1beta1_ip_address_list import V1beta1IPAddressList
+from kubernetes_asyncio.client.models.v1beta1_ip_address_spec import V1beta1IPAddressSpec
+from kubernetes_asyncio.client.models.v1beta1_json_patch import V1beta1JSONPatch
+from kubernetes_asyncio.client.models.v1beta1_lease_candidate import V1beta1LeaseCandidate
+from kubernetes_asyncio.client.models.v1beta1_lease_candidate_list import V1beta1LeaseCandidateList
+from kubernetes_asyncio.client.models.v1beta1_lease_candidate_spec import V1beta1LeaseCandidateSpec
+from kubernetes_asyncio.client.models.v1beta1_match_condition import V1beta1MatchCondition
+from kubernetes_asyncio.client.models.v1beta1_match_resources import V1beta1MatchResources
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy import V1beta1MutatingAdmissionPolicy
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy_binding import V1beta1MutatingAdmissionPolicyBinding
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy_binding_list import V1beta1MutatingAdmissionPolicyBindingList
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy_binding_spec import V1beta1MutatingAdmissionPolicyBindingSpec
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy_list import V1beta1MutatingAdmissionPolicyList
+from kubernetes_asyncio.client.models.v1beta1_mutating_admission_policy_spec import V1beta1MutatingAdmissionPolicySpec
+from kubernetes_asyncio.client.models.v1beta1_mutation import V1beta1Mutation
+from kubernetes_asyncio.client.models.v1beta1_named_rule_with_operations import V1beta1NamedRuleWithOperations
+from kubernetes_asyncio.client.models.v1beta1_network_device_data import V1beta1NetworkDeviceData
+from kubernetes_asyncio.client.models.v1beta1_opaque_device_configuration import V1beta1OpaqueDeviceConfiguration
+from kubernetes_asyncio.client.models.v1beta1_param_kind import V1beta1ParamKind
+from kubernetes_asyncio.client.models.v1beta1_param_ref import V1beta1ParamRef
+from kubernetes_asyncio.client.models.v1beta1_parent_reference import V1beta1ParentReference
+from kubernetes_asyncio.client.models.v1beta1_pod_certificate_request import V1beta1PodCertificateRequest
+from kubernetes_asyncio.client.models.v1beta1_pod_certificate_request_list import V1beta1PodCertificateRequestList
+from kubernetes_asyncio.client.models.v1beta1_pod_certificate_request_spec import V1beta1PodCertificateRequestSpec
+from kubernetes_asyncio.client.models.v1beta1_pod_certificate_request_status import V1beta1PodCertificateRequestStatus
+from kubernetes_asyncio.client.models.v1beta1_resource_claim import V1beta1ResourceClaim
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_consumer_reference import V1beta1ResourceClaimConsumerReference
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_list import V1beta1ResourceClaimList
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_spec import V1beta1ResourceClaimSpec
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_status import V1beta1ResourceClaimStatus
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_template import V1beta1ResourceClaimTemplate
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_template_list import V1beta1ResourceClaimTemplateList
+from kubernetes_asyncio.client.models.v1beta1_resource_claim_template_spec import V1beta1ResourceClaimTemplateSpec
+from kubernetes_asyncio.client.models.v1beta1_resource_pool import V1beta1ResourcePool
+from kubernetes_asyncio.client.models.v1beta1_resource_slice import V1beta1ResourceSlice
+from kubernetes_asyncio.client.models.v1beta1_resource_slice_list import V1beta1ResourceSliceList
+from kubernetes_asyncio.client.models.v1beta1_resource_slice_spec import V1beta1ResourceSliceSpec
+from kubernetes_asyncio.client.models.v1beta1_service_cidr import V1beta1ServiceCIDR
+from kubernetes_asyncio.client.models.v1beta1_service_cidr_list import V1beta1ServiceCIDRList
+from kubernetes_asyncio.client.models.v1beta1_service_cidr_spec import V1beta1ServiceCIDRSpec
+from kubernetes_asyncio.client.models.v1beta1_service_cidr_status import V1beta1ServiceCIDRStatus
+from kubernetes_asyncio.client.models.v1beta1_storage_version_migration import V1beta1StorageVersionMigration
+from kubernetes_asyncio.client.models.v1beta1_storage_version_migration_list import V1beta1StorageVersionMigrationList
+from kubernetes_asyncio.client.models.v1beta1_storage_version_migration_spec import V1beta1StorageVersionMigrationSpec
+from kubernetes_asyncio.client.models.v1beta1_storage_version_migration_status import V1beta1StorageVersionMigrationStatus
+from kubernetes_asyncio.client.models.v1beta1_variable import V1beta1Variable
+from kubernetes_asyncio.client.models.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass
+from kubernetes_asyncio.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList
+from kubernetes_asyncio.client.models.v1beta2_allocated_device_status import V1beta2AllocatedDeviceStatus
+from kubernetes_asyncio.client.models.v1beta2_allocation_result import V1beta2AllocationResult
+from kubernetes_asyncio.client.models.v1beta2_cel_device_selector import V1beta2CELDeviceSelector
+from kubernetes_asyncio.client.models.v1beta2_capacity_request_policy import V1beta2CapacityRequestPolicy
+from kubernetes_asyncio.client.models.v1beta2_capacity_request_policy_range import V1beta2CapacityRequestPolicyRange
+from kubernetes_asyncio.client.models.v1beta2_capacity_requirements import V1beta2CapacityRequirements
+from kubernetes_asyncio.client.models.v1beta2_counter import V1beta2Counter
+from kubernetes_asyncio.client.models.v1beta2_counter_set import V1beta2CounterSet
+from kubernetes_asyncio.client.models.v1beta2_device import V1beta2Device
+from kubernetes_asyncio.client.models.v1beta2_device_allocation_configuration import V1beta2DeviceAllocationConfiguration
+from kubernetes_asyncio.client.models.v1beta2_device_allocation_result import V1beta2DeviceAllocationResult
+from kubernetes_asyncio.client.models.v1beta2_device_attribute import V1beta2DeviceAttribute
+from kubernetes_asyncio.client.models.v1beta2_device_capacity import V1beta2DeviceCapacity
+from kubernetes_asyncio.client.models.v1beta2_device_claim import V1beta2DeviceClaim
+from kubernetes_asyncio.client.models.v1beta2_device_claim_configuration import V1beta2DeviceClaimConfiguration
+from kubernetes_asyncio.client.models.v1beta2_device_class import V1beta2DeviceClass
+from kubernetes_asyncio.client.models.v1beta2_device_class_configuration import V1beta2DeviceClassConfiguration
+from kubernetes_asyncio.client.models.v1beta2_device_class_list import V1beta2DeviceClassList
+from kubernetes_asyncio.client.models.v1beta2_device_class_spec import V1beta2DeviceClassSpec
+from kubernetes_asyncio.client.models.v1beta2_device_constraint import V1beta2DeviceConstraint
+from kubernetes_asyncio.client.models.v1beta2_device_counter_consumption import V1beta2DeviceCounterConsumption
+from kubernetes_asyncio.client.models.v1beta2_device_request import V1beta2DeviceRequest
+from kubernetes_asyncio.client.models.v1beta2_device_request_allocation_result import V1beta2DeviceRequestAllocationResult
+from kubernetes_asyncio.client.models.v1beta2_device_selector import V1beta2DeviceSelector
+from kubernetes_asyncio.client.models.v1beta2_device_sub_request import V1beta2DeviceSubRequest
+from kubernetes_asyncio.client.models.v1beta2_device_taint import V1beta2DeviceTaint
+from kubernetes_asyncio.client.models.v1beta2_device_toleration import V1beta2DeviceToleration
+from kubernetes_asyncio.client.models.v1beta2_exact_device_request import V1beta2ExactDeviceRequest
+from kubernetes_asyncio.client.models.v1beta2_network_device_data import V1beta2NetworkDeviceData
+from kubernetes_asyncio.client.models.v1beta2_opaque_device_configuration import V1beta2OpaqueDeviceConfiguration
+from kubernetes_asyncio.client.models.v1beta2_resource_claim import V1beta2ResourceClaim
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_consumer_reference import V1beta2ResourceClaimConsumerReference
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_list import V1beta2ResourceClaimList
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_spec import V1beta2ResourceClaimSpec
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_status import V1beta2ResourceClaimStatus
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_template import V1beta2ResourceClaimTemplate
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_template_list import V1beta2ResourceClaimTemplateList
+from kubernetes_asyncio.client.models.v1beta2_resource_claim_template_spec import V1beta2ResourceClaimTemplateSpec
+from kubernetes_asyncio.client.models.v1beta2_resource_pool import V1beta2ResourcePool
+from kubernetes_asyncio.client.models.v1beta2_resource_slice import V1beta2ResourceSlice
+from kubernetes_asyncio.client.models.v1beta2_resource_slice_list import V1beta2ResourceSliceList
+from kubernetes_asyncio.client.models.v1beta2_resource_slice_spec import V1beta2ResourceSliceSpec
+from kubernetes_asyncio.client.models.v2_api_group_discovery import V2APIGroupDiscovery
+from kubernetes_asyncio.client.models.v2_api_group_discovery_list import V2APIGroupDiscoveryList
+from kubernetes_asyncio.client.models.v2_api_resource_discovery import V2APIResourceDiscovery
+from kubernetes_asyncio.client.models.v2_api_subresource_discovery import V2APISubresourceDiscovery
+from kubernetes_asyncio.client.models.v2_api_version_discovery import V2APIVersionDiscovery
+from kubernetes_asyncio.client.models.v2_container_resource_metric_source import V2ContainerResourceMetricSource
+from kubernetes_asyncio.client.models.v2_container_resource_metric_status import V2ContainerResourceMetricStatus
+from kubernetes_asyncio.client.models.v2_cross_version_object_reference import V2CrossVersionObjectReference
+from kubernetes_asyncio.client.models.v2_external_metric_source import V2ExternalMetricSource
+from kubernetes_asyncio.client.models.v2_external_metric_status import V2ExternalMetricStatus
+from kubernetes_asyncio.client.models.v2_hpa_scaling_policy import V2HPAScalingPolicy
+from kubernetes_asyncio.client.models.v2_hpa_scaling_rules import V2HPAScalingRules
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler import V2HorizontalPodAutoscaler
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler_behavior import V2HorizontalPodAutoscalerBehavior
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler_condition import V2HorizontalPodAutoscalerCondition
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler_list import V2HorizontalPodAutoscalerList
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler_spec import V2HorizontalPodAutoscalerSpec
+from kubernetes_asyncio.client.models.v2_horizontal_pod_autoscaler_status import V2HorizontalPodAutoscalerStatus
+from kubernetes_asyncio.client.models.v2_metric_identifier import V2MetricIdentifier
+from kubernetes_asyncio.client.models.v2_metric_spec import V2MetricSpec
+from kubernetes_asyncio.client.models.v2_metric_status import V2MetricStatus
+from kubernetes_asyncio.client.models.v2_metric_target import V2MetricTarget
+from kubernetes_asyncio.client.models.v2_metric_value_status import V2MetricValueStatus
+from kubernetes_asyncio.client.models.v2_object_metric_source import V2ObjectMetricSource
+from kubernetes_asyncio.client.models.v2_object_metric_status import V2ObjectMetricStatus
+from kubernetes_asyncio.client.models.v2_pods_metric_source import V2PodsMetricSource
+from kubernetes_asyncio.client.models.v2_pods_metric_status import V2PodsMetricStatus
+from kubernetes_asyncio.client.models.v2_resource_metric_source import V2ResourceMetricSource
+from kubernetes_asyncio.client.models.v2_resource_metric_status import V2ResourceMetricStatus
+from kubernetes_asyncio.client.models.v2beta1_api_group_discovery import V2beta1APIGroupDiscovery
+from kubernetes_asyncio.client.models.v2beta1_api_group_discovery_list import V2beta1APIGroupDiscoveryList
+from kubernetes_asyncio.client.models.v2beta1_api_resource_discovery import V2beta1APIResourceDiscovery
+from kubernetes_asyncio.client.models.v2beta1_api_subresource_discovery import V2beta1APISubresourceDiscovery
+from kubernetes_asyncio.client.models.v2beta1_api_version_discovery import V2beta1APIVersionDiscovery
+from kubernetes_asyncio.client.models.version_info import VersionInfo
+
diff --git a/kubernetes_asyncio/client/api/__init__.py b/kubernetes_asyncio/client/api/__init__.py
new file mode 100644
index 0000000000..5206978d3c
--- /dev/null
+++ b/kubernetes_asyncio/client/api/__init__.py
@@ -0,0 +1,70 @@
+from __future__ import absolute_import
+
+# flake8: noqa
+
+# import apis into api package
+from kubernetes_asyncio.client.api.well_known_api import WellKnownApi
+from kubernetes_asyncio.client.api.admissionregistration_api import AdmissionregistrationApi
+from kubernetes_asyncio.client.api.admissionregistration_v1_api import AdmissionregistrationV1Api
+from kubernetes_asyncio.client.api.admissionregistration_v1alpha1_api import AdmissionregistrationV1alpha1Api
+from kubernetes_asyncio.client.api.admissionregistration_v1beta1_api import AdmissionregistrationV1beta1Api
+from kubernetes_asyncio.client.api.apiextensions_api import ApiextensionsApi
+from kubernetes_asyncio.client.api.apiextensions_v1_api import ApiextensionsV1Api
+from kubernetes_asyncio.client.api.apiregistration_api import ApiregistrationApi
+from kubernetes_asyncio.client.api.apiregistration_v1_api import ApiregistrationV1Api
+from kubernetes_asyncio.client.api.apis_api import ApisApi
+from kubernetes_asyncio.client.api.apps_api import AppsApi
+from kubernetes_asyncio.client.api.apps_v1_api import AppsV1Api
+from kubernetes_asyncio.client.api.authentication_api import AuthenticationApi
+from kubernetes_asyncio.client.api.authentication_v1_api import AuthenticationV1Api
+from kubernetes_asyncio.client.api.authorization_api import AuthorizationApi
+from kubernetes_asyncio.client.api.authorization_v1_api import AuthorizationV1Api
+from kubernetes_asyncio.client.api.autoscaling_api import AutoscalingApi
+from kubernetes_asyncio.client.api.autoscaling_v1_api import AutoscalingV1Api
+from kubernetes_asyncio.client.api.autoscaling_v2_api import AutoscalingV2Api
+from kubernetes_asyncio.client.api.batch_api import BatchApi
+from kubernetes_asyncio.client.api.batch_v1_api import BatchV1Api
+from kubernetes_asyncio.client.api.certificates_api import CertificatesApi
+from kubernetes_asyncio.client.api.certificates_v1_api import CertificatesV1Api
+from kubernetes_asyncio.client.api.certificates_v1alpha1_api import CertificatesV1alpha1Api
+from kubernetes_asyncio.client.api.certificates_v1beta1_api import CertificatesV1beta1Api
+from kubernetes_asyncio.client.api.coordination_api import CoordinationApi
+from kubernetes_asyncio.client.api.coordination_v1_api import CoordinationV1Api
+from kubernetes_asyncio.client.api.coordination_v1alpha2_api import CoordinationV1alpha2Api
+from kubernetes_asyncio.client.api.coordination_v1beta1_api import CoordinationV1beta1Api
+from kubernetes_asyncio.client.api.core_api import CoreApi
+from kubernetes_asyncio.client.api.core_v1_api import CoreV1Api
+from kubernetes_asyncio.client.api.custom_objects_api import CustomObjectsApi
+from kubernetes_asyncio.client.api.discovery_api import DiscoveryApi
+from kubernetes_asyncio.client.api.discovery_v1_api import DiscoveryV1Api
+from kubernetes_asyncio.client.api.events_api import EventsApi
+from kubernetes_asyncio.client.api.events_v1_api import EventsV1Api
+from kubernetes_asyncio.client.api.flowcontrol_apiserver_api import FlowcontrolApiserverApi
+from kubernetes_asyncio.client.api.flowcontrol_apiserver_v1_api import FlowcontrolApiserverV1Api
+from kubernetes_asyncio.client.api.internal_apiserver_api import InternalApiserverApi
+from kubernetes_asyncio.client.api.internal_apiserver_v1alpha1_api import InternalApiserverV1alpha1Api
+from kubernetes_asyncio.client.api.logs_api import LogsApi
+from kubernetes_asyncio.client.api.networking_api import NetworkingApi
+from kubernetes_asyncio.client.api.networking_v1_api import NetworkingV1Api
+from kubernetes_asyncio.client.api.networking_v1beta1_api import NetworkingV1beta1Api
+from kubernetes_asyncio.client.api.node_api import NodeApi
+from kubernetes_asyncio.client.api.node_v1_api import NodeV1Api
+from kubernetes_asyncio.client.api.openid_api import OpenidApi
+from kubernetes_asyncio.client.api.policy_api import PolicyApi
+from kubernetes_asyncio.client.api.policy_v1_api import PolicyV1Api
+from kubernetes_asyncio.client.api.rbac_authorization_api import RbacAuthorizationApi
+from kubernetes_asyncio.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api
+from kubernetes_asyncio.client.api.resource_api import ResourceApi
+from kubernetes_asyncio.client.api.resource_v1_api import ResourceV1Api
+from kubernetes_asyncio.client.api.resource_v1alpha3_api import ResourceV1alpha3Api
+from kubernetes_asyncio.client.api.resource_v1beta1_api import ResourceV1beta1Api
+from kubernetes_asyncio.client.api.resource_v1beta2_api import ResourceV1beta2Api
+from kubernetes_asyncio.client.api.scheduling_api import SchedulingApi
+from kubernetes_asyncio.client.api.scheduling_v1_api import SchedulingV1Api
+from kubernetes_asyncio.client.api.scheduling_v1alpha1_api import SchedulingV1alpha1Api
+from kubernetes_asyncio.client.api.storage_api import StorageApi
+from kubernetes_asyncio.client.api.storage_v1_api import StorageV1Api
+from kubernetes_asyncio.client.api.storage_v1beta1_api import StorageV1beta1Api
+from kubernetes_asyncio.client.api.storagemigration_api import StoragemigrationApi
+from kubernetes_asyncio.client.api.storagemigration_v1beta1_api import StoragemigrationV1beta1Api
+from kubernetes_asyncio.client.api.version_api import VersionApi
diff --git a/kubernetes_asyncio/client/api/admissionregistration_api.py b/kubernetes_asyncio/client/api/admissionregistration_api.py
new file mode 100644
index 0000000000..094070ff88
--- /dev/null
+++ b/kubernetes_asyncio/client/api/admissionregistration_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AdmissionregistrationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/admissionregistration_v1_api.py b/kubernetes_asyncio/client/api/admissionregistration_v1_api.py
new file mode 100644
index 0000000000..dc51c94911
--- /dev/null
+++ b/kubernetes_asyncio/client/api/admissionregistration_v1_api.py
@@ -0,0 +1,5911 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AdmissionregistrationV1Api(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 create_mutating_webhook_configuration(self, body, **kwargs): # noqa: E501
+ """create_mutating_webhook_configuration # noqa: E501
+
+ create a MutatingWebhookConfiguration # 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_mutating_webhook_configuration(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1MutatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1MutatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_mutating_webhook_configuration_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_webhook_configuration # noqa: E501
+
+ create a MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1MutatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1MutatingWebhookConfiguration",
+ 201: "V1MutatingWebhookConfiguration",
+ 202: "V1MutatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_validating_admission_policy(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy # noqa: E501
+
+ create a ValidatingAdmissionPolicy # 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_validating_admission_policy(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_validating_admission_policy_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy # noqa: E501
+
+ create a ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 201: "V1ValidatingAdmissionPolicy",
+ 202: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy_binding # noqa: E501
+
+ create a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_validating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_validating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy_binding # noqa: E501
+
+ create a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_binding" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyBinding",
+ 201: "V1ValidatingAdmissionPolicyBinding",
+ 202: "V1ValidatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_validating_webhook_configuration(self, body, **kwargs): # noqa: E501
+ """create_validating_webhook_configuration # noqa: E501
+
+ create a ValidatingWebhookConfiguration # 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_validating_webhook_configuration(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_validating_webhook_configuration_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_validating_webhook_configuration # noqa: E501
+
+ create a ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ValidatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_validating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingWebhookConfiguration",
+ 201: "V1ValidatingWebhookConfiguration",
+ 202: "V1ValidatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_mutating_webhook_configuration(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_webhook_configuration # noqa: E501
+
+ delete collection of MutatingWebhookConfiguration # 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_mutating_webhook_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_mutating_webhook_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_webhook_configuration # noqa: E501
+
+ delete collection of MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicy # 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_validating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_validating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_validating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy_binding # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy_binding # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_validating_webhook_configuration(self, **kwargs): # noqa: E501
+ """delete_collection_validating_webhook_configuration # noqa: E501
+
+ delete collection of ValidatingWebhookConfiguration # 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_validating_webhook_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_validating_webhook_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_validating_webhook_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_validating_webhook_configuration # noqa: E501
+
+ delete collection of ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501
+ """delete_mutating_webhook_configuration # noqa: E501
+
+ delete a MutatingWebhookConfiguration # 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_mutating_webhook_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_mutating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_webhook_configuration # noqa: E501
+
+ delete a MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy # noqa: E501
+
+ delete a ValidatingAdmissionPolicy # 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_validating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy # noqa: E501
+
+ delete a ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy_binding # noqa: E501
+
+ delete a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy_binding # noqa: E501
+
+ delete a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_validating_webhook_configuration(self, name, **kwargs): # noqa: E501
+ """delete_validating_webhook_configuration # noqa: E501
+
+ delete a ValidatingWebhookConfiguration # 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_validating_webhook_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_validating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_validating_webhook_configuration # noqa: E501
+
+ delete a ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_mutating_webhook_configuration(self, **kwargs): # noqa: E501
+ """list_mutating_webhook_configuration # noqa: E501
+
+ list or watch objects of kind MutatingWebhookConfiguration # 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_mutating_webhook_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1MutatingWebhookConfigurationList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_mutating_webhook_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_webhook_configuration # noqa: E501
+
+ list or watch objects of kind MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1MutatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1MutatingWebhookConfigurationList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_validating_admission_policy(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicy # 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_validating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_validating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_validating_webhook_configuration(self, **kwargs): # noqa: E501
+ """list_validating_webhook_configuration # noqa: E501
+
+ list or watch objects of kind ValidatingWebhookConfiguration # 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_validating_webhook_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingWebhookConfigurationList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_validating_webhook_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """list_validating_webhook_configuration # noqa: E501
+
+ list or watch objects of kind ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingWebhookConfigurationList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_webhook_configuration # noqa: E501
+
+ partially update the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1MutatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_mutating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_webhook_configuration # noqa: E501
+
+ partially update the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_webhook_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1MutatingWebhookConfiguration",
+ 201: "V1MutatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicy # 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_validating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 201: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_binding # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_binding # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyBinding",
+ 201: "V1ValidatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_status # noqa: E501
+
+ partially update status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_status # noqa: E501
+
+ partially update status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 201: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_validating_webhook_configuration(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_webhook_configuration # noqa: E501
+
+ partially update the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_validating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_webhook_configuration # noqa: E501
+
+ partially update the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_webhook_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ValidatingWebhookConfiguration",
+ 201: "V1ValidatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501
+ """read_mutating_webhook_configuration # noqa: E501
+
+ read the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1MutatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_mutating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_webhook_configuration # noqa: E501
+
+ read the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1MutatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_validating_admission_policy(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy # noqa: E501
+
+ read the specified ValidatingAdmissionPolicy # 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_validating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy # noqa: E501
+
+ read the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_binding # noqa: E501
+
+ read the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_binding # noqa: E501
+
+ read the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_validating_admission_policy_status(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_status # noqa: E501
+
+ read status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_validating_admission_policy_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_status # noqa: E501
+
+ read status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_validating_webhook_configuration(self, name, **kwargs): # noqa: E501
+ """read_validating_webhook_configuration # noqa: E501
+
+ read the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_validating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_webhook_configuration # noqa: E501
+
+ read the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_validating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_webhook_configuration # noqa: E501
+
+ replace the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1MutatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1MutatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_mutating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_webhook_configuration # noqa: E501
+
+ replace the specified MutatingWebhookConfiguration # 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_mutating_webhook_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1MutatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_webhook_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1MutatingWebhookConfiguration",
+ 201: "V1MutatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_validating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicy # 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_validating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 201: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_binding # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_binding # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicyBinding",
+ 201: "V1ValidatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_status # noqa: E501
+
+ replace status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_status # noqa: E501
+
+ replace status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingAdmissionPolicy",
+ 201: "V1ValidatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_validating_webhook_configuration(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_webhook_configuration # noqa: E501
+
+ replace the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ValidatingWebhookConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_validating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_validating_webhook_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_webhook_configuration # noqa: E501
+
+ replace the specified ValidatingWebhookConfiguration # 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_validating_webhook_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ValidatingWebhookConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ValidatingWebhookConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_validating_webhook_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_webhook_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_webhook_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ValidatingWebhookConfiguration",
+ 201: "V1ValidatingWebhookConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/admissionregistration_v1alpha1_api.py b/kubernetes_asyncio/client/api/admissionregistration_v1alpha1_api.py
new file mode 100644
index 0000000000..dd8a09a110
--- /dev/null
+++ b/kubernetes_asyncio/client/api/admissionregistration_v1alpha1_api.py
@@ -0,0 +1,2781 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AdmissionregistrationV1alpha1Api(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 create_mutating_admission_policy(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
+
+ create a MutatingAdmissionPolicy # 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_mutating_admission_policy(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
+
+ create a MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicy",
+ 201: "V1alpha1MutatingAdmissionPolicy",
+ 202: "V1alpha1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
+
+ create a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
+
+ create a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyBinding",
+ 201: "V1alpha1MutatingAdmissionPolicyBinding",
+ 202: "V1alpha1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
+
+ delete collection of MutatingAdmissionPolicy # 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_mutating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
+
+ delete collection of MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy_binding # noqa: E501
+
+ delete collection of MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy_binding # noqa: E501
+
+ delete collection of MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
+
+ delete a MutatingAdmissionPolicy # 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_mutating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
+
+ delete a MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
+
+ delete a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
+
+ delete a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicy # 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_mutating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicy",
+ 201: "V1alpha1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy_binding # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy_binding # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyBinding",
+ 201: "V1alpha1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
+
+ read the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
+
+ read the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
+
+ read the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
+
+ read the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
+
+ replace the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
+
+ replace the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicy",
+ 201: "V1alpha1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
+
+ replace the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
+
+ replace the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1MutatingAdmissionPolicyBinding",
+ 201: "V1alpha1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/admissionregistration_v1beta1_api.py b/kubernetes_asyncio/client/api/admissionregistration_v1beta1_api.py
new file mode 100644
index 0000000000..1ed714c3e3
--- /dev/null
+++ b/kubernetes_asyncio/client/api/admissionregistration_v1beta1_api.py
@@ -0,0 +1,2781 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AdmissionregistrationV1beta1Api(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 create_mutating_admission_policy(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
+
+ create a MutatingAdmissionPolicy # 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_mutating_admission_policy(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
+
+ create a MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicy",
+ 201: "V1beta1MutatingAdmissionPolicy",
+ 202: "V1beta1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
+
+ create a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
+
+ create a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyBinding",
+ 201: "V1beta1MutatingAdmissionPolicyBinding",
+ 202: "V1beta1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
+
+ delete collection of MutatingAdmissionPolicy # 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_mutating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
+
+ delete collection of MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy_binding # noqa: E501
+
+ delete collection of MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy_binding # noqa: E501
+
+ delete collection of MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
+
+ delete a MutatingAdmissionPolicy # 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_mutating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
+
+ delete a MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
+
+ delete a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
+
+ delete a MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicy # 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_mutating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicy",
+ 201: "V1beta1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy_binding # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy_binding # noqa: E501
+
+ partially update the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyBinding",
+ 201: "V1beta1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
+
+ read the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
+
+ read the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
+
+ read the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
+
+ read the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
+
+ replace the specified MutatingAdmissionPolicy # 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_mutating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
+
+ replace the specified MutatingAdmissionPolicy # 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_mutating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicy (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicy",
+ 201: "V1beta1MutatingAdmissionPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
+
+ replace the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1MutatingAdmissionPolicyBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
+
+ replace the specified MutatingAdmissionPolicyBinding # 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_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the MutatingAdmissionPolicyBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1MutatingAdmissionPolicyBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_mutating_admission_policy_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1MutatingAdmissionPolicyBinding",
+ 201: "V1beta1MutatingAdmissionPolicyBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apiextensions_api.py b/kubernetes_asyncio/client/api/apiextensions_api.py
new file mode 100644
index 0000000000..985c008553
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apiextensions_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ApiextensionsApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apiextensions_v1_api.py b/kubernetes_asyncio/client/api/apiextensions_v1_api.py
new file mode 100644
index 0000000000..14176121fc
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apiextensions_v1_api.py
@@ -0,0 +1,1987 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ApiextensionsV1Api(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 create_custom_resource_definition(self, body, **kwargs): # noqa: E501
+ """create_custom_resource_definition # noqa: E501
+
+ create a CustomResourceDefinition # 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_custom_resource_definition(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_custom_resource_definition_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_custom_resource_definition # noqa: E501
+
+ create a CustomResourceDefinition # 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_custom_resource_definition_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_custom_resource_definition`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 201: "V1CustomResourceDefinition",
+ 202: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_custom_resource_definition(self, **kwargs): # noqa: E501
+ """delete_collection_custom_resource_definition # noqa: E501
+
+ delete collection of CustomResourceDefinition # 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_custom_resource_definition(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_custom_resource_definition_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_custom_resource_definition # noqa: E501
+
+ delete collection of CustomResourceDefinition # 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_custom_resource_definition_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_custom_resource_definition(self, name, **kwargs): # noqa: E501
+ """delete_custom_resource_definition # noqa: E501
+
+ delete a CustomResourceDefinition # 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_custom_resource_definition(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_custom_resource_definition_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_custom_resource_definition # noqa: E501
+
+ delete a CustomResourceDefinition # 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_custom_resource_definition_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_custom_resource_definition`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_custom_resource_definition(self, **kwargs): # noqa: E501
+ """list_custom_resource_definition # noqa: E501
+
+ list or watch objects of kind CustomResourceDefinition # 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_custom_resource_definition(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinitionList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_custom_resource_definition_with_http_info(**kwargs) # noqa: E501
+
+ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E501
+ """list_custom_resource_definition # noqa: E501
+
+ list or watch objects of kind CustomResourceDefinition # 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_custom_resource_definition_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinitionList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinitionList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_custom_resource_definition(self, name, body, **kwargs): # noqa: E501
+ """patch_custom_resource_definition # noqa: E501
+
+ partially update the specified CustomResourceDefinition # 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_custom_resource_definition(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_custom_resource_definition_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_custom_resource_definition # noqa: E501
+
+ partially update the specified CustomResourceDefinition # 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_custom_resource_definition_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_custom_resource_definition`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_custom_resource_definition`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 201: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_custom_resource_definition_status(self, name, body, **kwargs): # noqa: E501
+ """patch_custom_resource_definition_status # noqa: E501
+
+ partially update status of the specified CustomResourceDefinition # 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_custom_resource_definition_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_custom_resource_definition_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_custom_resource_definition_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_custom_resource_definition_status # noqa: E501
+
+ partially update status of the specified CustomResourceDefinition # 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_custom_resource_definition_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_custom_resource_definition_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_custom_resource_definition_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 201: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_custom_resource_definition(self, name, **kwargs): # noqa: E501
+ """read_custom_resource_definition # noqa: E501
+
+ read the specified CustomResourceDefinition # 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_custom_resource_definition(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_custom_resource_definition_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_custom_resource_definition # noqa: E501
+
+ read the specified CustomResourceDefinition # 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_custom_resource_definition_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_custom_resource_definition`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_custom_resource_definition_status(self, name, **kwargs): # noqa: E501
+ """read_custom_resource_definition_status # noqa: E501
+
+ read status of the specified CustomResourceDefinition # 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_custom_resource_definition_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_custom_resource_definition_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_custom_resource_definition_status # noqa: E501
+
+ read status of the specified CustomResourceDefinition # 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_custom_resource_definition_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_custom_resource_definition_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_custom_resource_definition(self, name, body, **kwargs): # noqa: E501
+ """replace_custom_resource_definition # noqa: E501
+
+ replace the specified CustomResourceDefinition # 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_custom_resource_definition(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_custom_resource_definition_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_custom_resource_definition # noqa: E501
+
+ replace the specified CustomResourceDefinition # 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_custom_resource_definition_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_custom_resource_definition`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_custom_resource_definition`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 201: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_custom_resource_definition_status(self, name, body, **kwargs): # noqa: E501
+ """replace_custom_resource_definition_status # noqa: E501
+
+ replace status of the specified CustomResourceDefinition # 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_custom_resource_definition_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CustomResourceDefinition
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_custom_resource_definition_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_custom_resource_definition_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_custom_resource_definition_status # noqa: E501
+
+ replace status of the specified CustomResourceDefinition # 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_custom_resource_definition_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CustomResourceDefinition (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CustomResourceDefinition
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_resource_definition_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_custom_resource_definition_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_custom_resource_definition_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CustomResourceDefinition",
+ 201: "V1CustomResourceDefinition",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apiregistration_api.py b/kubernetes_asyncio/client/api/apiregistration_api.py
new file mode 100644
index 0000000000..dda860acfb
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apiregistration_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ApiregistrationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apiregistration_v1_api.py b/kubernetes_asyncio/client/api/apiregistration_v1_api.py
new file mode 100644
index 0000000000..1366850cca
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apiregistration_v1_api.py
@@ -0,0 +1,1987 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ApiregistrationV1Api(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 create_api_service(self, body, **kwargs): # noqa: E501
+ """create_api_service # noqa: E501
+
+ create an APIService # 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_api_service(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_api_service_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_api_service # noqa: E501
+
+ create an APIService # 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_api_service_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_service" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_api_service`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIService",
+ 201: "V1APIService",
+ 202: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_api_service(self, name, **kwargs): # noqa: E501
+ """delete_api_service # noqa: E501
+
+ delete an APIService # 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_api_service(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_api_service_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_api_service # noqa: E501
+
+ delete an APIService # 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_api_service_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_api_service`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_api_service(self, **kwargs): # noqa: E501
+ """delete_collection_api_service # noqa: E501
+
+ delete collection of APIService # 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_api_service(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_api_service_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_api_service # noqa: E501
+
+ delete collection of APIService # 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_api_service_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_service" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_api_service(self, **kwargs): # noqa: E501
+ """list_api_service # noqa: E501
+
+ list or watch objects of kind APIService # 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_api_service(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIServiceList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_api_service_with_http_info(**kwargs) # noqa: E501
+
+ def list_api_service_with_http_info(self, **kwargs): # noqa: E501
+ """list_api_service # noqa: E501
+
+ list or watch objects of kind APIService # 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_api_service_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIServiceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_service" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIServiceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_api_service(self, name, body, **kwargs): # noqa: E501
+ """patch_api_service # noqa: E501
+
+ partially update the specified APIService # 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_api_service(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_api_service_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_api_service # noqa: E501
+
+ partially update the specified APIService # 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_api_service_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_api_service`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_api_service`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIService",
+ 201: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_api_service_status(self, name, body, **kwargs): # noqa: E501
+ """patch_api_service_status # noqa: E501
+
+ partially update status of the specified APIService # 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_api_service_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_api_service_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_api_service_status # noqa: E501
+
+ partially update status of the specified APIService # 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_api_service_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_api_service_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_api_service_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIService",
+ 201: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_api_service(self, name, **kwargs): # noqa: E501
+ """read_api_service # noqa: E501
+
+ read the specified APIService # 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_api_service(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_api_service_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_api_service # noqa: E501
+
+ read the specified APIService # 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_api_service_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_api_service`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_api_service_status(self, name, **kwargs): # noqa: E501
+ """read_api_service_status # noqa: E501
+
+ read status of the specified APIService # 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_api_service_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_api_service_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_api_service_status # noqa: E501
+
+ read status of the specified APIService # 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_api_service_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_api_service_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_api_service(self, name, body, **kwargs): # noqa: E501
+ """replace_api_service # noqa: E501
+
+ replace the specified APIService # 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_api_service(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_api_service_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_api_service # noqa: E501
+
+ replace the specified APIService # 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_api_service_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_api_service`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_api_service`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIService",
+ 201: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_api_service_status(self, name, body, **kwargs): # noqa: E501
+ """replace_api_service_status # noqa: E501
+
+ replace status of the specified APIService # 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_api_service_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIService
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_api_service_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_api_service_status # noqa: E501
+
+ replace status of the specified APIService # 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_api_service_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the APIService (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1APIService
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_api_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_api_service_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_api_service_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIService",
+ 201: "V1APIService",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apis_api.py b/kubernetes_asyncio/client/api/apis_api.py
new file mode 100644
index 0000000000..71e5048e63
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apis_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ApisApi(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 get_api_versions(self, **kwargs): # noqa: E501
+ """get_api_versions # noqa: E501
+
+ get available API versions # 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_versions(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroupList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_versions_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_versions # noqa: E501
+
+ get available API versions # 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_versions_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroupList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_versions" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroupList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apps_api.py b/kubernetes_asyncio/client/api/apps_api.py
new file mode 100644
index 0000000000..7208ac5294
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apps_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AppsApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/apps_v1_api.py b/kubernetes_asyncio/client/api/apps_v1_api.py
new file mode 100644
index 0000000000..40ab85676f
--- /dev/null
+++ b/kubernetes_asyncio/client/api/apps_v1_api.py
@@ -0,0 +1,11888 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AppsV1Api(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 create_namespaced_controller_revision(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_controller_revision # noqa: E501
+
+ create a ControllerRevision # 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_controller_revision(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ControllerRevision
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevision
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_controller_revision_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_controller_revision_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_controller_revision # noqa: E501
+
+ create a ControllerRevision # 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_controller_revision_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ControllerRevision
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_controller_revision`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ControllerRevision",
+ 201: "V1ControllerRevision",
+ 202: "V1ControllerRevision",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_daemon_set(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_daemon_set # noqa: E501
+
+ create a DaemonSet # 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_daemon_set(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_daemon_set_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_daemon_set # noqa: E501
+
+ create a DaemonSet # 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_daemon_set_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_daemon_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 201: "V1DaemonSet",
+ 202: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_deployment(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_deployment # noqa: E501
+
+ create a Deployment # 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_deployment(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_deployment # noqa: E501
+
+ create a Deployment # 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_deployment_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_deployment`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 201: "V1Deployment",
+ 202: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_replica_set(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_replica_set # noqa: E501
+
+ create a ReplicaSet # 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_replica_set(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_replica_set_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_replica_set # noqa: E501
+
+ create a ReplicaSet # 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_replica_set_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_replica_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 201: "V1ReplicaSet",
+ 202: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_stateful_set(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_stateful_set # noqa: E501
+
+ create a StatefulSet # 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_stateful_set(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_stateful_set_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_stateful_set # noqa: E501
+
+ create a StatefulSet # 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_stateful_set_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_stateful_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 201: "V1StatefulSet",
+ 202: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_controller_revision(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_controller_revision # noqa: E501
+
+ delete collection of ControllerRevision # 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_controller_revision(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_controller_revision_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_controller_revision_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_controller_revision # noqa: E501
+
+ delete collection of ControllerRevision # 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_controller_revision_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_controller_revision`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_daemon_set(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_daemon_set # noqa: E501
+
+ delete collection of DaemonSet # 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_daemon_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_daemon_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_daemon_set # noqa: E501
+
+ delete collection of DaemonSet # 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_daemon_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_daemon_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_deployment(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_deployment # noqa: E501
+
+ delete collection of Deployment # 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_deployment(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_deployment_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_deployment # noqa: E501
+
+ delete collection of Deployment # 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_deployment_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_deployment`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_replica_set(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_replica_set # noqa: E501
+
+ delete collection of ReplicaSet # 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_replica_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_replica_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_replica_set # noqa: E501
+
+ delete collection of ReplicaSet # 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_replica_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_replica_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_stateful_set(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_stateful_set # noqa: E501
+
+ delete collection of StatefulSet # 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_stateful_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_stateful_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_stateful_set # noqa: E501
+
+ delete collection of StatefulSet # 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_stateful_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_stateful_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_controller_revision(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_controller_revision # noqa: E501
+
+ delete a ControllerRevision # 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_controller_revision(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_controller_revision_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_controller_revision # noqa: E501
+
+ delete a ControllerRevision # 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_controller_revision_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_controller_revision`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_daemon_set # noqa: E501
+
+ delete a DaemonSet # 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_daemon_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_daemon_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_daemon_set # noqa: E501
+
+ delete a DaemonSet # 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_daemon_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_daemon_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_deployment # noqa: E501
+
+ delete a Deployment # 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_deployment(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_deployment_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_deployment # noqa: E501
+
+ delete a Deployment # 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_deployment_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_deployment`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_replica_set # noqa: E501
+
+ delete a ReplicaSet # 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_replica_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_replica_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_replica_set # noqa: E501
+
+ delete a ReplicaSet # 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_replica_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_replica_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_stateful_set # noqa: E501
+
+ delete a StatefulSet # 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_stateful_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_stateful_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_stateful_set # noqa: E501
+
+ delete a StatefulSet # 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_stateful_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_stateful_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_controller_revision_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_controller_revision_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ControllerRevision # 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_controller_revision_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevisionList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_controller_revision_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_controller_revision_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ControllerRevision # 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_controller_revision_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ControllerRevisionList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/controllerrevisions', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_daemon_set_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_daemon_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind DaemonSet # 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_daemon_set_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_daemon_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_daemon_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind DaemonSet # 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_daemon_set_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/daemonsets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_deployment_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_deployment_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Deployment # 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_deployment_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeploymentList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_deployment_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_deployment_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Deployment # 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_deployment_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeploymentList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/deployments', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_controller_revision(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_controller_revision # noqa: E501
+
+ list or watch objects of kind ControllerRevision # 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_controller_revision(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevisionList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_controller_revision_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_controller_revision # noqa: E501
+
+ list or watch objects of kind ControllerRevision # 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_controller_revision_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_controller_revision`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ControllerRevisionList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_daemon_set(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_daemon_set # noqa: E501
+
+ list or watch objects of kind DaemonSet # 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_daemon_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_daemon_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_daemon_set # noqa: E501
+
+ list or watch objects of kind DaemonSet # 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_daemon_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_daemon_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_deployment(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_deployment # noqa: E501
+
+ list or watch objects of kind Deployment # 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_deployment(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeploymentList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_deployment_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_deployment # noqa: E501
+
+ list or watch objects of kind Deployment # 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_deployment_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_deployment`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeploymentList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_replica_set(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_replica_set # noqa: E501
+
+ list or watch objects of kind ReplicaSet # 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_replica_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_replica_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_replica_set # noqa: E501
+
+ list or watch objects of kind ReplicaSet # 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_replica_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_replica_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_stateful_set(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_stateful_set # noqa: E501
+
+ list or watch objects of kind StatefulSet # 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_stateful_set(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_stateful_set_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_stateful_set # noqa: E501
+
+ list or watch objects of kind StatefulSet # 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_stateful_set_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_stateful_set`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_replica_set_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_replica_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ReplicaSet # 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_replica_set_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_replica_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_replica_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ReplicaSet # 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_replica_set_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/replicasets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_stateful_set_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_stateful_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind StatefulSet # 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_stateful_set_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_stateful_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_stateful_set_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind StatefulSet # 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_stateful_set_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/statefulsets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_controller_revision(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_controller_revision # noqa: E501
+
+ partially update the specified ControllerRevision # 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_controller_revision(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevision
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_controller_revision_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_controller_revision # noqa: E501
+
+ partially update the specified ControllerRevision # 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_controller_revision_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_controller_revision`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ControllerRevision",
+ 201: "V1ControllerRevision",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_daemon_set # noqa: E501
+
+ partially update the specified DaemonSet # 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_daemon_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_daemon_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_daemon_set # noqa: E501
+
+ partially update the specified DaemonSet # 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_daemon_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_daemon_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 201: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_daemon_set_status # noqa: E501
+
+ partially update status of the specified DaemonSet # 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_daemon_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_daemon_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_daemon_set_status # noqa: E501
+
+ partially update status of the specified DaemonSet # 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_daemon_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_daemon_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_daemon_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 201: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_deployment(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment # noqa: E501
+
+ partially update the specified Deployment # 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_deployment(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_deployment_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment # noqa: E501
+
+ partially update the specified Deployment # 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_deployment_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 201: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_deployment_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment_scale # noqa: E501
+
+ partially update scale of the specified Deployment # 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_deployment_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_deployment_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment_scale # noqa: E501
+
+ partially update scale of the specified Deployment # 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_deployment_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_deployment_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment_status # noqa: E501
+
+ partially update status of the specified Deployment # 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_deployment_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_deployment_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_deployment_status # noqa: E501
+
+ partially update status of the specified Deployment # 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_deployment_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 201: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set # noqa: E501
+
+ partially update the specified ReplicaSet # 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_replica_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_replica_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set # noqa: E501
+
+ partially update the specified ReplicaSet # 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_replica_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 201: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set_scale # noqa: E501
+
+ partially update scale of the specified ReplicaSet # 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_replica_set_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_replica_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set_scale # noqa: E501
+
+ partially update scale of the specified ReplicaSet # 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_replica_set_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_replica_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set_status # noqa: E501
+
+ partially update status of the specified ReplicaSet # 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_replica_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_replica_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_replica_set_status # noqa: E501
+
+ partially update status of the specified ReplicaSet # 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_replica_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 201: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_stateful_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set # noqa: E501
+
+ partially update the specified StatefulSet # 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_stateful_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_stateful_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set # noqa: E501
+
+ partially update the specified StatefulSet # 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_stateful_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 201: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set_scale # noqa: E501
+
+ partially update scale of the specified StatefulSet # 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_stateful_set_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_stateful_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set_scale # noqa: E501
+
+ partially update scale of the specified StatefulSet # 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_stateful_set_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_stateful_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set_status # noqa: E501
+
+ partially update status of the specified StatefulSet # 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_stateful_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_stateful_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_stateful_set_status # noqa: E501
+
+ partially update status of the specified StatefulSet # 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_stateful_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 201: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_controller_revision(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_controller_revision # noqa: E501
+
+ read the specified ControllerRevision # 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_controller_revision(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevision
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_controller_revision_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_controller_revision_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_controller_revision # noqa: E501
+
+ read the specified ControllerRevision # 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_controller_revision_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_controller_revision`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ControllerRevision",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_daemon_set # noqa: E501
+
+ read the specified DaemonSet # 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_daemon_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_daemon_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_daemon_set # noqa: E501
+
+ read the specified DaemonSet # 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_daemon_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_daemon_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_daemon_set_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_daemon_set_status # noqa: E501
+
+ read status of the specified DaemonSet # 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_daemon_set_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_daemon_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_daemon_set_status # noqa: E501
+
+ read status of the specified DaemonSet # 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_daemon_set_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_daemon_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_daemon_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment # noqa: E501
+
+ read the specified Deployment # 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_deployment(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_deployment_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment # noqa: E501
+
+ read the specified Deployment # 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_deployment_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_deployment_scale(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment_scale # noqa: E501
+
+ read scale of the specified Deployment # 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_deployment_scale(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_deployment_scale_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment_scale # noqa: E501
+
+ read scale of the specified Deployment # 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_deployment_scale_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_deployment_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment_status # noqa: E501
+
+ read status of the specified Deployment # 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_deployment_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_deployment_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_deployment_status # noqa: E501
+
+ read status of the specified Deployment # 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_deployment_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set # noqa: E501
+
+ read the specified ReplicaSet # 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_replica_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_replica_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set # noqa: E501
+
+ read the specified ReplicaSet # 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_replica_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_replica_set_scale(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set_scale # noqa: E501
+
+ read scale of the specified ReplicaSet # 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_replica_set_scale(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_replica_set_scale_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set_scale # noqa: E501
+
+ read scale of the specified ReplicaSet # 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_replica_set_scale_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_replica_set_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set_status # noqa: E501
+
+ read status of the specified ReplicaSet # 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_replica_set_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_replica_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_replica_set_status # noqa: E501
+
+ read status of the specified ReplicaSet # 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_replica_set_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set # noqa: E501
+
+ read the specified StatefulSet # 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_stateful_set(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_stateful_set_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set # noqa: E501
+
+ read the specified StatefulSet # 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_stateful_set_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_stateful_set_scale(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set_scale # noqa: E501
+
+ read scale of the specified StatefulSet # 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_stateful_set_scale(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_stateful_set_scale_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set_scale # noqa: E501
+
+ read scale of the specified StatefulSet # 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_stateful_set_scale_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_stateful_set_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set_status # noqa: E501
+
+ read status of the specified StatefulSet # 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_stateful_set_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_stateful_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_stateful_set_status # noqa: E501
+
+ read status of the specified StatefulSet # 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_stateful_set_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_controller_revision(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_controller_revision # noqa: E501
+
+ replace the specified ControllerRevision # 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_controller_revision(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ControllerRevision
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ControllerRevision
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_controller_revision_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_controller_revision # noqa: E501
+
+ replace the specified ControllerRevision # 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_controller_revision_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ControllerRevision (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ControllerRevision
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_controller_revision" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_controller_revision`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_controller_revision`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ControllerRevision",
+ 201: "V1ControllerRevision",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_daemon_set # noqa: E501
+
+ replace the specified DaemonSet # 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_daemon_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_daemon_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_daemon_set # noqa: E501
+
+ replace the specified DaemonSet # 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_daemon_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_daemon_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 201: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_daemon_set_status # noqa: E501
+
+ replace status of the specified DaemonSet # 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_daemon_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DaemonSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_daemon_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_daemon_set_status # noqa: E501
+
+ replace status of the specified DaemonSet # 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_daemon_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DaemonSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1DaemonSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_daemon_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_daemon_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_daemon_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DaemonSet",
+ 201: "V1DaemonSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_deployment(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment # noqa: E501
+
+ replace the specified Deployment # 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_deployment(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_deployment_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment # noqa: E501
+
+ replace the specified Deployment # 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_deployment_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 201: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_deployment_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment_scale # noqa: E501
+
+ replace scale of the specified Deployment # 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_deployment_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_deployment_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment_scale # noqa: E501
+
+ replace scale of the specified Deployment # 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_deployment_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_deployment_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment_status # noqa: E501
+
+ replace status of the specified Deployment # 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_deployment_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Deployment
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_deployment_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_deployment_status # noqa: E501
+
+ replace status of the specified Deployment # 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_deployment_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Deployment (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Deployment
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_deployment_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Deployment",
+ 201: "V1Deployment",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set # noqa: E501
+
+ replace the specified ReplicaSet # 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_replica_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_replica_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set # noqa: E501
+
+ replace the specified ReplicaSet # 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_replica_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 201: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set_scale # noqa: E501
+
+ replace scale of the specified ReplicaSet # 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_replica_set_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_replica_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set_scale # noqa: E501
+
+ replace scale of the specified ReplicaSet # 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_replica_set_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_replica_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set_status # noqa: E501
+
+ replace status of the specified ReplicaSet # 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_replica_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicaSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_replica_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_replica_set_status # noqa: E501
+
+ replace status of the specified ReplicaSet # 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_replica_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ReplicaSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicaSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_replica_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicaSet",
+ 201: "V1ReplicaSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_stateful_set(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set # noqa: E501
+
+ replace the specified StatefulSet # 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_stateful_set(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_stateful_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set # noqa: E501
+
+ replace the specified StatefulSet # 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_stateful_set_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 201: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set_scale # noqa: E501
+
+ replace scale of the specified StatefulSet # 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_stateful_set_scale(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_stateful_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set_scale # noqa: E501
+
+ replace scale of the specified StatefulSet # 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_stateful_set_scale_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_stateful_set_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set_status # noqa: E501
+
+ replace status of the specified StatefulSet # 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_stateful_set_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1StatefulSet
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_stateful_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_stateful_set_status # noqa: E501
+
+ replace status of the specified StatefulSet # 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_stateful_set_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StatefulSet (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1StatefulSet
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_stateful_set_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1StatefulSet",
+ 201: "V1StatefulSet",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/authentication_api.py b/kubernetes_asyncio/client/api/authentication_api.py
new file mode 100644
index 0000000000..ce2ac1e179
--- /dev/null
+++ b/kubernetes_asyncio/client/api/authentication_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AuthenticationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authentication.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/authentication_v1_api.py b/kubernetes_asyncio/client/api/authentication_v1_api.py
new file mode 100644
index 0000000000..d3b6564255
--- /dev/null
+++ b/kubernetes_asyncio/client/api/authentication_v1_api.py
@@ -0,0 +1,501 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AuthenticationV1Api(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 create_self_subject_review(self, body, **kwargs): # noqa: E501
+ """create_self_subject_review # noqa: E501
+
+ create a SelfSubjectReview # 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_self_subject_review(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SelfSubjectReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_self_subject_review_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_self_subject_review # noqa: E501
+
+ create a SelfSubjectReview # 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_self_subject_review_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SelfSubjectReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_self_subject_review" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SelfSubjectReview",
+ 201: "V1SelfSubjectReview",
+ 202: "V1SelfSubjectReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authentication.k8s.io/v1/selfsubjectreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_token_review(self, body, **kwargs): # noqa: E501
+ """create_token_review # noqa: E501
+
+ create a TokenReview # 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_token_review(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1TokenReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1TokenReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_token_review_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_token_review # noqa: E501
+
+ create a TokenReview # 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_token_review_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1TokenReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1TokenReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_token_review" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_token_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1TokenReview",
+ 201: "V1TokenReview",
+ 202: "V1TokenReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authentication.k8s.io/v1/tokenreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authentication.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/authorization_api.py b/kubernetes_asyncio/client/api/authorization_api.py
new file mode 100644
index 0000000000..9bf5317e52
--- /dev/null
+++ b/kubernetes_asyncio/client/api/authorization_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AuthorizationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/authorization_v1_api.py b/kubernetes_asyncio/client/api/authorization_v1_api.py
new file mode 100644
index 0000000000..b0cfdb4017
--- /dev/null
+++ b/kubernetes_asyncio/client/api/authorization_v1_api.py
@@ -0,0 +1,847 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AuthorizationV1Api(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 create_namespaced_local_subject_access_review(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_local_subject_access_review # noqa: E501
+
+ create a LocalSubjectAccessReview # 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_local_subject_access_review(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LocalSubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LocalSubjectAccessReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_local_subject_access_review_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_local_subject_access_review_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_local_subject_access_review # noqa: E501
+
+ create a LocalSubjectAccessReview # 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_local_subject_access_review_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LocalSubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LocalSubjectAccessReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_local_subject_access_review" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_local_subject_access_review`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_local_subject_access_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LocalSubjectAccessReview",
+ 201: "V1LocalSubjectAccessReview",
+ 202: "V1LocalSubjectAccessReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_self_subject_access_review(self, body, **kwargs): # noqa: E501
+ """create_self_subject_access_review # noqa: E501
+
+ create a SelfSubjectAccessReview # 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_self_subject_access_review(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SelfSubjectAccessReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_self_subject_access_review_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_self_subject_access_review # noqa: E501
+
+ create a SelfSubjectAccessReview # 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_self_subject_access_review_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SelfSubjectAccessReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_self_subject_access_review" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_access_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SelfSubjectAccessReview",
+ 201: "V1SelfSubjectAccessReview",
+ 202: "V1SelfSubjectAccessReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_self_subject_rules_review(self, body, **kwargs): # noqa: E501
+ """create_self_subject_rules_review # noqa: E501
+
+ create a SelfSubjectRulesReview # 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_self_subject_rules_review(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectRulesReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SelfSubjectRulesReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_self_subject_rules_review_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_self_subject_rules_review # noqa: E501
+
+ create a SelfSubjectRulesReview # 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_self_subject_rules_review_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SelfSubjectRulesReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SelfSubjectRulesReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_self_subject_rules_review" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_rules_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SelfSubjectRulesReview",
+ 201: "V1SelfSubjectRulesReview",
+ 202: "V1SelfSubjectRulesReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_subject_access_review(self, body, **kwargs): # noqa: E501
+ """create_subject_access_review # noqa: E501
+
+ create a SubjectAccessReview # 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_subject_access_review(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SubjectAccessReview
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_subject_access_review_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_subject_access_review # noqa: E501
+
+ create a SubjectAccessReview # 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_subject_access_review_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1SubjectAccessReview
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SubjectAccessReview, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_subject_access_review" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_subject_access_review`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SubjectAccessReview",
+ 201: "V1SubjectAccessReview",
+ 202: "V1SubjectAccessReview",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/v1/subjectaccessreviews', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/authorization.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/autoscaling_api.py b/kubernetes_asyncio/client/api/autoscaling_api.py
new file mode 100644
index 0000000000..2f0360eda5
--- /dev/null
+++ b/kubernetes_asyncio/client/api/autoscaling_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AutoscalingApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/autoscaling_v1_api.py b/kubernetes_asyncio/client/api/autoscaling_v1_api.py
new file mode 100644
index 0000000000..8e0cb112cb
--- /dev/null
+++ b/kubernetes_asyncio/client/api/autoscaling_v1_api.py
@@ -0,0 +1,2292 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AutoscalingV1Api(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 create_namespaced_horizontal_pod_autoscaler(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ create a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ create a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 201: "V1HorizontalPodAutoscaler",
+ 202: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete collection of HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete collection of HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscalerList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscalerList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/horizontalpodautoscalers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscalerList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscalerList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ partially update the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ partially update the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 201: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ partially update status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ partially update status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 201: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ read the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ read the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ read status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ read status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ replace the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ replace the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 201: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ replace status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ replace status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1HorizontalPodAutoscaler",
+ 201: "V1HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/autoscaling_v2_api.py b/kubernetes_asyncio/client/api/autoscaling_v2_api.py
new file mode 100644
index 0000000000..8b9ae92a4a
--- /dev/null
+++ b/kubernetes_asyncio/client/api/autoscaling_v2_api.py
@@ -0,0 +1,2292 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class AutoscalingV2Api(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 create_namespaced_horizontal_pod_autoscaler(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ create a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ create a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 201: "V2HorizontalPodAutoscaler",
+ 202: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete collection of HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete collection of HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ delete a HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscalerList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscalerList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/horizontalpodautoscalers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscalerList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ list or watch objects of kind HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscalerList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ partially update the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ partially update the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 201: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ partially update status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ partially update status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 201: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ read the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ read the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ read status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ read status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ replace the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler # noqa: E501
+
+ replace the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 201: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ replace status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V2HorizontalPodAutoscaler
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501
+
+ replace status of the specified HorizontalPodAutoscaler # 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_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the HorizontalPodAutoscaler (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V2HorizontalPodAutoscaler
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_horizontal_pod_autoscaler_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V2HorizontalPodAutoscaler",
+ 201: "V2HorizontalPodAutoscaler",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/batch_api.py b/kubernetes_asyncio/client/api/batch_api.py
new file mode 100644
index 0000000000..d0f817c03f
--- /dev/null
+++ b/kubernetes_asyncio/client/api/batch_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class BatchApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/batch_v1_api.py b/kubernetes_asyncio/client/api/batch_v1_api.py
new file mode 100644
index 0000000000..fbba24ab3e
--- /dev/null
+++ b/kubernetes_asyncio/client/api/batch_v1_api.py
@@ -0,0 +1,4419 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class BatchV1Api(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 create_namespaced_cron_job(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_cron_job # noqa: E501
+
+ create a CronJob # 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_cron_job(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_cron_job_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_cron_job # noqa: E501
+
+ create a CronJob # 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_cron_job_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_cron_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 201: "V1CronJob",
+ 202: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_job(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_job # noqa: E501
+
+ create a Job # 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_job(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_job_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_job # noqa: E501
+
+ create a Job # 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_job_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Job",
+ 201: "V1Job",
+ 202: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_cron_job(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_cron_job # noqa: E501
+
+ delete collection of CronJob # 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_cron_job(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_cron_job_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_cron_job # noqa: E501
+
+ delete collection of CronJob # 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_cron_job_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_cron_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_job(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_job # noqa: E501
+
+ delete collection of Job # 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_job(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_job_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_job # noqa: E501
+
+ delete collection of Job # 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_job_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_cron_job # noqa: E501
+
+ delete a CronJob # 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_cron_job(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_cron_job_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_cron_job # noqa: E501
+
+ delete a CronJob # 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_cron_job_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_cron_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_job(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_job # noqa: E501
+
+ delete a Job # 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_job(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_job_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_job # noqa: E501
+
+ delete a Job # 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_job_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cron_job_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_cron_job_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind CronJob # 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_cron_job_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJobList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cron_job_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_cron_job_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind CronJob # 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_cron_job_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJobList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/cronjobs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_job_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_job_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Job # 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_job_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1JobList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_job_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_job_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Job # 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_job_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1JobList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/jobs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_cron_job(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_cron_job # noqa: E501
+
+ list or watch objects of kind CronJob # 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_cron_job(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJobList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_cron_job_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_cron_job # noqa: E501
+
+ list or watch objects of kind CronJob # 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_cron_job_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_cron_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJobList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_job(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_job # noqa: E501
+
+ list or watch objects of kind Job # 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_job(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1JobList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_job_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_job # noqa: E501
+
+ list or watch objects of kind Job # 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_job_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_job`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1JobList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_cron_job # noqa: E501
+
+ partially update the specified CronJob # 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_cron_job(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_cron_job # noqa: E501
+
+ partially update the specified CronJob # 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_cron_job_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_cron_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 201: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_cron_job_status # noqa: E501
+
+ partially update status of the specified CronJob # 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_cron_job_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_cron_job_status # noqa: E501
+
+ partially update status of the specified CronJob # 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_cron_job_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_cron_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_cron_job_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_cron_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 201: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_job # noqa: E501
+
+ partially update the specified Job # 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_job(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_job # noqa: E501
+
+ partially update the specified Job # 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_job_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Job",
+ 201: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_job_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_job_status # noqa: E501
+
+ partially update status of the specified Job # 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_job_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_job_status # noqa: E501
+
+ partially update status of the specified Job # 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_job_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_job_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Job",
+ 201: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_cron_job # noqa: E501
+
+ read the specified CronJob # 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_cron_job(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_cron_job_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_cron_job # noqa: E501
+
+ read the specified CronJob # 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_cron_job_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_cron_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_cron_job_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_cron_job_status # noqa: E501
+
+ read status of the specified CronJob # 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_cron_job_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_cron_job_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_cron_job_status # noqa: E501
+
+ read status of the specified CronJob # 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_cron_job_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_cron_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_cron_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_job(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_job # noqa: E501
+
+ read the specified Job # 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_job(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_job_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_job # noqa: E501
+
+ read the specified Job # 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_job_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_job_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_job_status # noqa: E501
+
+ read status of the specified Job # 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_job_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_job_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_job_status # noqa: E501
+
+ read status of the specified Job # 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_job_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_cron_job # noqa: E501
+
+ replace the specified CronJob # 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_cron_job(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_cron_job # noqa: E501
+
+ replace the specified CronJob # 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_cron_job_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_cron_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_cron_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 201: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_cron_job_status # noqa: E501
+
+ replace status of the specified CronJob # 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_cron_job_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CronJob
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_cron_job_status # noqa: E501
+
+ replace status of the specified CronJob # 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_cron_job_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CronJob (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1CronJob
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cron_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_cron_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_cron_job_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_cron_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CronJob",
+ 201: "V1CronJob",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_job # noqa: E501
+
+ replace the specified Job # 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_job(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_job # noqa: E501
+
+ replace the specified Job # 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_job_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_job`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_job`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_job`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Job",
+ 201: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_job_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_job_status # noqa: E501
+
+ replace status of the specified Job # 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_job_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Job
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_job_status # noqa: E501
+
+ replace status of the specified Job # 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_job_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Job (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Job
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_job_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_job_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_job_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_job_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Job",
+ 201: "V1Job",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/certificates_api.py b/kubernetes_asyncio/client/api/certificates_api.py
new file mode 100644
index 0000000000..2f608fbdd6
--- /dev/null
+++ b/kubernetes_asyncio/client/api/certificates_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CertificatesApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/certificates_v1_api.py b/kubernetes_asyncio/client/api/certificates_v1_api.py
new file mode 100644
index 0000000000..41d3e89fd2
--- /dev/null
+++ b/kubernetes_asyncio/client/api/certificates_v1_api.py
@@ -0,0 +1,2501 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CertificatesV1Api(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 create_certificate_signing_request(self, body, **kwargs): # noqa: E501
+ """create_certificate_signing_request # noqa: E501
+
+ create a CertificateSigningRequest # 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_certificate_signing_request(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_certificate_signing_request_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_certificate_signing_request # noqa: E501
+
+ create a CertificateSigningRequest # 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_certificate_signing_request_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_certificate_signing_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 202: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_certificate_signing_request(self, name, **kwargs): # noqa: E501
+ """delete_certificate_signing_request # noqa: E501
+
+ delete a CertificateSigningRequest # 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_certificate_signing_request(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_certificate_signing_request_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_certificate_signing_request # noqa: E501
+
+ delete a CertificateSigningRequest # 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_certificate_signing_request_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_certificate_signing_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_certificate_signing_request(self, **kwargs): # noqa: E501
+ """delete_collection_certificate_signing_request # noqa: E501
+
+ delete collection of CertificateSigningRequest # 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_certificate_signing_request(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_certificate_signing_request_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_certificate_signing_request # noqa: E501
+
+ delete collection of CertificateSigningRequest # 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_certificate_signing_request_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_certificate_signing_request(self, **kwargs): # noqa: E501
+ """list_certificate_signing_request # noqa: E501
+
+ list or watch objects of kind CertificateSigningRequest # 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_certificate_signing_request(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequestList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_certificate_signing_request_with_http_info(**kwargs) # noqa: E501
+
+ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E501
+ """list_certificate_signing_request # noqa: E501
+
+ list or watch objects of kind CertificateSigningRequest # 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_certificate_signing_request_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequestList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequestList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_certificate_signing_request(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request # noqa: E501
+
+ partially update the specified CertificateSigningRequest # 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_certificate_signing_request(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_certificate_signing_request_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request # noqa: E501
+
+ partially update the specified CertificateSigningRequest # 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_certificate_signing_request_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_certificate_signing_request_approval(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request_approval # noqa: E501
+
+ partially update approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_certificate_signing_request_approval_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_certificate_signing_request_approval_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request_approval # noqa: E501
+
+ partially update approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_approval" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request_approval`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request_approval`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_certificate_signing_request_status(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request_status # noqa: E501
+
+ partially update status of the specified CertificateSigningRequest # 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_certificate_signing_request_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_certificate_signing_request_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_certificate_signing_request_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_certificate_signing_request_status # noqa: E501
+
+ partially update status of the specified CertificateSigningRequest # 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_certificate_signing_request_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_certificate_signing_request(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request # noqa: E501
+
+ read the specified CertificateSigningRequest # 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_certificate_signing_request(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_certificate_signing_request_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request # noqa: E501
+
+ read the specified CertificateSigningRequest # 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_certificate_signing_request_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_certificate_signing_request_approval(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request_approval # noqa: E501
+
+ read approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_certificate_signing_request_approval_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_certificate_signing_request_approval_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request_approval # noqa: E501
+
+ read approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_approval" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request_approval`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_certificate_signing_request_status(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request_status # noqa: E501
+
+ read status of the specified CertificateSigningRequest # 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_certificate_signing_request_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_certificate_signing_request_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_certificate_signing_request_status # noqa: E501
+
+ read status of the specified CertificateSigningRequest # 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_certificate_signing_request_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_certificate_signing_request(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request # noqa: E501
+
+ replace the specified CertificateSigningRequest # 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_certificate_signing_request(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_certificate_signing_request_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_certificate_signing_request_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request # noqa: E501
+
+ replace the specified CertificateSigningRequest # 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_certificate_signing_request_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_certificate_signing_request_approval(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request_approval # noqa: E501
+
+ replace approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_certificate_signing_request_approval_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_certificate_signing_request_approval_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request_approval # noqa: E501
+
+ replace approval of the specified CertificateSigningRequest # 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_certificate_signing_request_approval_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_approval" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request_approval`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request_approval`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_certificate_signing_request_status(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request_status # noqa: E501
+
+ replace status of the specified CertificateSigningRequest # 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_certificate_signing_request_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1CertificateSigningRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_certificate_signing_request_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_certificate_signing_request_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_certificate_signing_request_status # noqa: E501
+
+ replace status of the specified CertificateSigningRequest # 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_certificate_signing_request_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the CertificateSigningRequest (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1CertificateSigningRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_signing_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1CertificateSigningRequest",
+ 201: "V1CertificateSigningRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/certificates_v1alpha1_api.py b/kubernetes_asyncio/client/api/certificates_v1alpha1_api.py
new file mode 100644
index 0000000000..022d42db19
--- /dev/null
+++ b/kubernetes_asyncio/client/api/certificates_v1alpha1_api.py
@@ -0,0 +1,1473 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CertificatesV1alpha1Api(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 create_cluster_trust_bundle(self, body, **kwargs): # noqa: E501
+ """create_cluster_trust_bundle # noqa: E501
+
+ create a ClusterTrustBundle # 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_cluster_trust_bundle(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_cluster_trust_bundle_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_cluster_trust_bundle # noqa: E501
+
+ create a ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1ClusterTrustBundle",
+ 201: "V1alpha1ClusterTrustBundle",
+ 202: "V1alpha1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
+ """delete_cluster_trust_bundle # noqa: E501
+
+ delete a ClusterTrustBundle # 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_cluster_trust_bundle(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_cluster_trust_bundle # noqa: E501
+
+ delete a ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_trust_bundle # noqa: E501
+
+ delete collection of ClusterTrustBundle # 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_cluster_trust_bundle(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_trust_bundle # noqa: E501
+
+ delete collection of ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cluster_trust_bundle(self, **kwargs): # noqa: E501
+ """list_cluster_trust_bundle # noqa: E501
+
+ list or watch objects of kind ClusterTrustBundle # 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_cluster_trust_bundle(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1ClusterTrustBundleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501
+
+ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501
+ """list_cluster_trust_bundle # noqa: E501
+
+ list or watch objects of kind ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1ClusterTrustBundleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_trust_bundle # noqa: E501
+
+ partially update the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_trust_bundle # noqa: E501
+
+ partially update the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_trust_bundle`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha1ClusterTrustBundle",
+ 201: "V1alpha1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
+ """read_cluster_trust_bundle # noqa: E501
+
+ read the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_cluster_trust_bundle # noqa: E501
+
+ read the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_trust_bundle # noqa: E501
+
+ replace the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_trust_bundle # noqa: E501
+
+ replace the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_trust_bundle`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1ClusterTrustBundle",
+ 201: "V1alpha1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/certificates_v1beta1_api.py b/kubernetes_asyncio/client/api/certificates_v1beta1_api.py
new file mode 100644
index 0000000000..34f0a7fbce
--- /dev/null
+++ b/kubernetes_asyncio/client/api/certificates_v1beta1_api.py
@@ -0,0 +1,3600 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CertificatesV1beta1Api(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 create_cluster_trust_bundle(self, body, **kwargs): # noqa: E501
+ """create_cluster_trust_bundle # noqa: E501
+
+ create a ClusterTrustBundle # 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_cluster_trust_bundle(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_cluster_trust_bundle_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_cluster_trust_bundle # noqa: E501
+
+ create a ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ClusterTrustBundle",
+ 201: "V1beta1ClusterTrustBundle",
+ 202: "V1beta1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_pod_certificate_request(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_pod_certificate_request # noqa: E501
+
+ create a PodCertificateRequest # 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_certificate_request(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_pod_certificate_request_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_pod_certificate_request_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_pod_certificate_request # noqa: E501
+
+ create a PodCertificateRequest # 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_certificate_request_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_certificate_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 201: "V1beta1PodCertificateRequest",
+ 202: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
+ """delete_cluster_trust_bundle # noqa: E501
+
+ delete a ClusterTrustBundle # 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_cluster_trust_bundle(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_cluster_trust_bundle # noqa: E501
+
+ delete a ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_trust_bundle # noqa: E501
+
+ delete collection of ClusterTrustBundle # 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_cluster_trust_bundle(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_trust_bundle # noqa: E501
+
+ delete collection of ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_pod_certificate_request(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_pod_certificate_request # noqa: E501
+
+ delete collection of PodCertificateRequest # 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_certificate_request(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_pod_certificate_request_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_pod_certificate_request_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_pod_certificate_request # noqa: E501
+
+ delete collection of PodCertificateRequest # 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_certificate_request_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_certificate_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_pod_certificate_request # noqa: E501
+
+ delete a PodCertificateRequest # 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_certificate_request(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_pod_certificate_request_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_pod_certificate_request # noqa: E501
+
+ delete a PodCertificateRequest # 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_certificate_request_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_certificate_request`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cluster_trust_bundle(self, **kwargs): # noqa: E501
+ """list_cluster_trust_bundle # noqa: E501
+
+ list or watch objects of kind ClusterTrustBundle # 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_cluster_trust_bundle(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ClusterTrustBundleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501
+
+ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501
+ """list_cluster_trust_bundle # noqa: E501
+
+ list or watch objects of kind ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ClusterTrustBundleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_pod_certificate_request(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_pod_certificate_request # noqa: E501
+
+ list or watch objects of kind PodCertificateRequest # 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_certificate_request(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequestList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_pod_certificate_request_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_pod_certificate_request_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_pod_certificate_request # noqa: E501
+
+ list or watch objects of kind PodCertificateRequest # 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_certificate_request_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_certificate_request`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequestList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_pod_certificate_request_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_pod_certificate_request_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind PodCertificateRequest # 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_certificate_request_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequestList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_pod_certificate_request_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_pod_certificate_request_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_pod_certificate_request_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind PodCertificateRequest # 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_certificate_request_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequestList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/podcertificaterequests', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_trust_bundle # noqa: E501
+
+ partially update the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_trust_bundle # noqa: E501
+
+ partially update the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_trust_bundle`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1ClusterTrustBundle",
+ 201: "V1beta1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_certificate_request # noqa: E501
+
+ partially update the specified PodCertificateRequest # 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_certificate_request(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_pod_certificate_request_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_certificate_request # noqa: E501
+
+ partially update the specified PodCertificateRequest # 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_certificate_request_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 201: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_certificate_request_status # noqa: E501
+
+ partially update status of the specified PodCertificateRequest # 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_certificate_request_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_certificate_request_status # noqa: E501
+
+ partially update status of the specified PodCertificateRequest # 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_certificate_request_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 201: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
+ """read_cluster_trust_bundle # noqa: E501
+
+ read the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_cluster_trust_bundle # noqa: E501
+
+ read the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_certificate_request # noqa: E501
+
+ read the specified PodCertificateRequest # 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_certificate_request(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_pod_certificate_request_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_certificate_request # noqa: E501
+
+ read the specified PodCertificateRequest # 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_certificate_request_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_certificate_request`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_pod_certificate_request_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_certificate_request_status # noqa: E501
+
+ read status of the specified PodCertificateRequest # 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_certificate_request_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_certificate_request_status # noqa: E501
+
+ read status of the specified PodCertificateRequest # 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_certificate_request_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_certificate_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_trust_bundle # noqa: E501
+
+ replace the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ClusterTrustBundle
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_trust_bundle # noqa: E501
+
+ replace the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterTrustBundle (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ClusterTrustBundle
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_trust_bundle" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_trust_bundle`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_trust_bundle`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ClusterTrustBundle",
+ 201: "V1beta1ClusterTrustBundle",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_certificate_request # noqa: E501
+
+ replace the specified PodCertificateRequest # 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_certificate_request(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_pod_certificate_request_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_certificate_request # noqa: E501
+
+ replace the specified PodCertificateRequest # 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_certificate_request_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 201: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_certificate_request_status # noqa: E501
+
+ replace status of the specified PodCertificateRequest # 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_certificate_request_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1PodCertificateRequest
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_certificate_request_status # noqa: E501
+
+ replace status of the specified PodCertificateRequest # 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_certificate_request_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodCertificateRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1PodCertificateRequest
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_certificate_request_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1PodCertificateRequest",
+ 201: "V1beta1PodCertificateRequest",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/coordination_api.py b/kubernetes_asyncio/client/api/coordination_api.py
new file mode 100644
index 0000000000..94b9b17f44
--- /dev/null
+++ b/kubernetes_asyncio/client/api/coordination_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CoordinationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/coordination_v1_api.py b/kubernetes_asyncio/client/api/coordination_v1_api.py
new file mode 100644
index 0000000000..c550c5c46f
--- /dev/null
+++ b/kubernetes_asyncio/client/api/coordination_v1_api.py
@@ -0,0 +1,1748 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CoordinationV1Api(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 create_namespaced_lease(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease # noqa: E501
+
+ create a Lease # 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_lease(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Lease
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Lease
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_lease_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease # noqa: E501
+
+ create a Lease # 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_lease_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Lease
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Lease",
+ 201: "V1Lease",
+ 202: "V1Lease",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_lease(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease # noqa: E501
+
+ delete collection of Lease # 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_lease(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_lease_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease # noqa: E501
+
+ delete collection of Lease # 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_lease_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease # noqa: E501
+
+ delete a Lease # 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_lease(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_lease_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease # noqa: E501
+
+ delete a Lease # 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_lease_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_lease_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_lease_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Lease # 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_lease_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LeaseList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_lease_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_lease_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Lease # 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_lease_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LeaseList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/leases', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_lease(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease # noqa: E501
+
+ list or watch objects of kind Lease # 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_lease(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LeaseList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_lease_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease # noqa: E501
+
+ list or watch objects of kind Lease # 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_lease_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LeaseList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease # noqa: E501
+
+ partially update the specified Lease # 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_lease(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Lease
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_lease_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease # noqa: E501
+
+ partially update the specified Lease # 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_lease_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Lease",
+ 201: "V1Lease",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease # noqa: E501
+
+ read the specified Lease # 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_lease(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Lease
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_lease_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease # noqa: E501
+
+ read the specified Lease # 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_lease_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Lease",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease # noqa: E501
+
+ replace the specified Lease # 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_lease(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Lease
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Lease
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_lease_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease # noqa: E501
+
+ replace the specified Lease # 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_lease_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Lease (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Lease
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Lease",
+ 201: "V1Lease",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/coordination_v1alpha2_api.py b/kubernetes_asyncio/client/api/coordination_v1alpha2_api.py
new file mode 100644
index 0000000000..ed98b9f787
--- /dev/null
+++ b/kubernetes_asyncio/client/api/coordination_v1alpha2_api.py
@@ -0,0 +1,1748 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CoordinationV1alpha2Api(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 create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease_candidate # noqa: E501
+
+ create a LeaseCandidate # 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_lease_candidate(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1alpha2LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_lease_candidate_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease_candidate # noqa: E501
+
+ create a LeaseCandidate # 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_lease_candidate_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1alpha2LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidate",
+ 201: "V1alpha2LeaseCandidate",
+ 202: "V1alpha2LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease_candidate # noqa: E501
+
+ delete collection of LeaseCandidate # 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_lease_candidate(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease_candidate # noqa: E501
+
+ delete collection of LeaseCandidate # 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_lease_candidate_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease_candidate # noqa: E501
+
+ delete a LeaseCandidate # 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_lease_candidate(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease_candidate # noqa: E501
+
+ delete a LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_lease_candidate_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_lease_candidate_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_lease_candidate_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_lease_candidate_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/leasecandidates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease_candidate # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease_candidate # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease_candidate # noqa: E501
+
+ partially update the specified LeaseCandidate # 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_lease_candidate(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease_candidate # noqa: E501
+
+ partially update the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidate",
+ 201: "V1alpha2LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease_candidate # noqa: E501
+
+ read the specified LeaseCandidate # 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_lease_candidate(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease_candidate # noqa: E501
+
+ read the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease_candidate # noqa: E501
+
+ replace the specified LeaseCandidate # 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_lease_candidate(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1alpha2LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha2LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease_candidate # noqa: E501
+
+ replace the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1alpha2LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha2LeaseCandidate",
+ 201: "V1alpha2LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/coordination_v1beta1_api.py b/kubernetes_asyncio/client/api/coordination_v1beta1_api.py
new file mode 100644
index 0000000000..0276bfd3ae
--- /dev/null
+++ b/kubernetes_asyncio/client/api/coordination_v1beta1_api.py
@@ -0,0 +1,1748 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CoordinationV1beta1Api(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 create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease_candidate # noqa: E501
+
+ create a LeaseCandidate # 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_lease_candidate(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_lease_candidate_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_lease_candidate # noqa: E501
+
+ create a LeaseCandidate # 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_lease_candidate_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidate",
+ 201: "V1beta1LeaseCandidate",
+ 202: "V1beta1LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease_candidate # noqa: E501
+
+ delete collection of LeaseCandidate # 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_lease_candidate(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_lease_candidate # noqa: E501
+
+ delete collection of LeaseCandidate # 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_lease_candidate_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease_candidate # noqa: E501
+
+ delete a LeaseCandidate # 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_lease_candidate(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_lease_candidate # noqa: E501
+
+ delete a LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_lease_candidate_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_lease_candidate_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_lease_candidate_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_lease_candidate_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/leasecandidates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease_candidate # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_lease_candidate # noqa: E501
+
+ list or watch objects of kind LeaseCandidate # 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_lease_candidate_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease_candidate`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease_candidate # noqa: E501
+
+ partially update the specified LeaseCandidate # 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_lease_candidate(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_lease_candidate # noqa: E501
+
+ partially update the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidate",
+ 201: "V1beta1LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease_candidate # noqa: E501
+
+ read the specified LeaseCandidate # 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_lease_candidate(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_lease_candidate # noqa: E501
+
+ read the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease_candidate # noqa: E501
+
+ replace the specified LeaseCandidate # 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_lease_candidate(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1LeaseCandidate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_lease_candidate # noqa: E501
+
+ replace the specified LeaseCandidate # 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_lease_candidate_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the LeaseCandidate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1LeaseCandidate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_lease_candidate" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease_candidate`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease_candidate`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1LeaseCandidate",
+ 201: "V1beta1LeaseCandidate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/core_api.py b/kubernetes_asyncio/client/api/core_api.py
new file mode 100644
index 0000000000..78a27f7114
--- /dev/null
+++ b/kubernetes_asyncio/client/api/core_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CoreApi(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 get_api_versions(self, **kwargs): # noqa: E501
+ """get_api_versions # noqa: E501
+
+ get available API versions # 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_versions(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIVersions
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_versions_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_versions # noqa: E501
+
+ get available API versions # 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_versions_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIVersions, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_versions" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIVersions",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/api/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/core_v1_api.py b/kubernetes_asyncio/client/api/core_v1_api.py
new file mode 100644
index 0000000000..e3472bf311
--- /dev/null
+++ b/kubernetes_asyncio/client/api/core_v1_api.py
@@ -0,0 +1,37869 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodAttachOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
+ :type stderr: bool
+ :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
+ :type stdout: bool
+ :param 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.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodAttachOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
+ :type stderr: bool
+ :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
+ :type stdout: bool
+ :param 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.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('container') is not None: # noqa: E501
+ query_params.append(('container', local_var_params['container'])) # noqa: E501
+ if local_var_params.get('stderr') is not None: # noqa: E501
+ query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
+ if local_var_params.get('stdin') is not None: # noqa: E501
+ query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
+ if local_var_params.get('stdout') is not None: # noqa: E501
+ query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
+ if local_var_params.get('tty') is not None: # noqa: E501
+ query_params.append(('tty', local_var_params['tty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodExecOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param command: Command is the remote command to execute. argv array. Not executed within a shell.
+ :type command: str
+ :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Redirect the standard error stream of the pod for this call.
+ :type stderr: bool
+ :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Redirect the standard output stream of the pod for this call.
+ :type stdout: bool
+ :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodExecOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param command: Command is the remote command to execute. argv array. Not executed within a shell.
+ :type command: str
+ :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Redirect the standard error stream of the pod for this call.
+ :type stderr: bool
+ :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Redirect the standard output stream of the pod for this call.
+ :type stdout: bool
+ :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('command') is not None: # noqa: E501
+ query_params.append(('command', local_var_params['command'])) # noqa: E501
+ if local_var_params.get('container') is not None: # noqa: E501
+ query_params.append(('container', local_var_params['container'])) # noqa: E501
+ if local_var_params.get('stderr') is not None: # noqa: E501
+ query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
+ if local_var_params.get('stdin') is not None: # noqa: E501
+ query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
+ if local_var_params.get('stdout') is not None: # noqa: E501
+ query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
+ if local_var_params.get('tty') is not None: # noqa: E501
+ query_params.append(('tty', local_var_params['tty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodPortForwardOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param ports: List of ports to forward Required when using WebSockets
+ :type ports: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodPortForwardOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param ports: List of ports to forward Required when using WebSockets
+ :type ports: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'ports'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('ports') is not None: # noqa: E501
+ query_params.append(('ports', local_var_params['ports'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodAttachOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
+ :type stderr: bool
+ :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
+ :type stdout: bool
+ :param 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.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodAttachOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
+ :type stderr: bool
+ :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
+ :type stdout: bool
+ :param 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.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('container') is not None: # noqa: E501
+ query_params.append(('container', local_var_params['container'])) # noqa: E501
+ if local_var_params.get('stderr') is not None: # noqa: E501
+ query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
+ if local_var_params.get('stdin') is not None: # noqa: E501
+ query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
+ if local_var_params.get('stdout') is not None: # noqa: E501
+ query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
+ if local_var_params.get('tty') is not None: # noqa: E501
+ query_params.append(('tty', local_var_params['tty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodExecOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param command: Command is the remote command to execute. argv array. Not executed within a shell.
+ :type command: str
+ :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Redirect the standard error stream of the pod for this call.
+ :type stderr: bool
+ :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Redirect the standard output stream of the pod for this call.
+ :type stdout: bool
+ :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodExecOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param command: Command is the remote command to execute. argv array. Not executed within a shell.
+ :type command: str
+ :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
+ :type container: str
+ :param stderr: Redirect the standard error stream of the pod for this call.
+ :type stderr: bool
+ :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
+ :type stdin: bool
+ :param stdout: Redirect the standard output stream of the pod for this call.
+ :type stdout: bool
+ :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
+ :type tty: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('command') is not None: # noqa: E501
+ query_params.append(('command', local_var_params['command'])) # noqa: E501
+ if local_var_params.get('container') is not None: # noqa: E501
+ query_params.append(('container', local_var_params['container'])) # noqa: E501
+ if local_var_params.get('stderr') is not None: # noqa: E501
+ query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
+ if local_var_params.get('stdin') is not None: # noqa: E501
+ query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
+ if local_var_params.get('stdout') is not None: # noqa: E501
+ query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
+ if local_var_params.get('tty') is not None: # noqa: E501
+ query_params.append(('tty', local_var_params['tty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodPortForwardOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param ports: List of ports to forward Required when using WebSockets
+ :type ports: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodPortForwardOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param ports: List of ports to forward Required when using WebSockets
+ :type ports: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'ports'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('ports') is not None: # noqa: E501
+ query_params.append(('ports', local_var_params['ports'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: Path is the URL path to use for the current proxy request to pod.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the PodProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to pod.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param 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.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the ServiceProxyOptions (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param 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.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: Path is the URL path to use for the current proxy request to node.
+ :type path: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('path') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the NodeProxyOptions (required)
+ :type name: str
+ :param path: path to the resource (required)
+ :type path: str
+ :param path2: Path is the URL path to use for the current proxy request to node.
+ :type path2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'path',
+ 'path2'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('path2') is not None: # noqa: E501
+ query_params.append(('path', local_var_params['path2'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 202: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Binding
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Binding
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Binding
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Binding",
+ 201: "V1Binding",
+ 202: "V1Binding",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ConfigMap
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMap
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ConfigMap
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ConfigMap",
+ 201: "V1ConfigMap",
+ 202: "V1ConfigMap",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Endpoints
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Endpoints
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Endpoints
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Endpoints",
+ 201: "V1Endpoints",
+ 202: "V1Endpoints",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: CoreV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1Event
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: CoreV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "CoreV1Event",
+ 201: "CoreV1Event",
+ 202: "CoreV1Event",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LimitRange
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRange
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LimitRange
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LimitRange",
+ 201: "V1LimitRange",
+ 202: "V1LimitRange",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 201: "V1PersistentVolumeClaim",
+ 202: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 202: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Binding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Binding
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Binding
+ """
+ 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 name: name of the Binding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Binding
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Binding",
+ 201: "V1Binding",
+ 202: "V1Binding",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Eviction (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Eviction
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Eviction
+ """
+ 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 name: name of the Eviction (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Eviction
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Eviction, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Eviction",
+ 201: "V1Eviction",
+ 202: "V1Eviction",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplate
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplate",
+ 201: "V1PodTemplate",
+ 202: "V1PodTemplate",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 201: "V1ReplicationController",
+ 202: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 201: "V1ResourceQuota",
+ 202: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Secret
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Secret
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Secret
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Secret",
+ 201: "V1Secret",
+ 202: "V1Secret",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 201: "V1Service",
+ 202: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ServiceAccount
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccount
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ServiceAccount
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccount",
+ 201: "V1ServiceAccount",
+ 202: "V1ServiceAccount",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the TokenRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: AuthenticationV1TokenRequest
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: AuthenticationV1TokenRequest
+ """
+ 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 name: name of the TokenRequest (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: AuthenticationV1TokenRequest
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(AuthenticationV1TokenRequest, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "AuthenticationV1TokenRequest",
+ 201: "AuthenticationV1TokenRequest",
+ 202: "AuthenticationV1TokenRequest",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Node",
+ 201: "V1Node",
+ 202: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 201: "V1PersistentVolume",
+ 202: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 202: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 202: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplate
+ """
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplate",
+ 202: "V1PodTemplate",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 202: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 202: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccount
+ """
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccount",
+ 202: "V1ServiceAccount",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 202: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ComponentStatusList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ComponentStatusList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ComponentStatusList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMapList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ConfigMapList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointsList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointsList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1EventList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "CoreV1EventList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRangeList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LimitRangeList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NamespaceList
+ """
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NamespaceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NamespaceList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMapList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ConfigMapList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointsList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointsList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1EventList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "CoreV1EventList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRangeList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LimitRangeList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaimList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaimList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplateList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplateList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationControllerList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationControllerList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuotaList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuotaList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SecretList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SecretList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccountList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccountList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NodeList
+ """
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NodeList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NodeList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeList
+ """
+ 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaimList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaimList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplateList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplateList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationControllerList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationControllerList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuotaList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuotaList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1SecretList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1SecretList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccountList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccountList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceList",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMap
+ """
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ConfigMap",
+ 201: "V1ConfigMap",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Endpoints
+ """
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Endpoints",
+ 201: "V1Endpoints",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "CoreV1Event",
+ 201: "CoreV1Event",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRange
+ """
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1LimitRange",
+ 201: "V1LimitRange",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 201: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 201: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplate
+ """
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PodTemplate",
+ 201: "V1PodTemplate",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 201: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 201: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 201: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 201: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Secret
+ """
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Secret",
+ 201: "V1Secret",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Service",
+ 201: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccount
+ """
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ServiceAccount",
+ 201: "V1ServiceAccount",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Service",
+ 201: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Node",
+ 201: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Node",
+ 201: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 201: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 201: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ComponentStatus (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ComponentStatus
+ """
+ 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 name: name of the ComponentStatus (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ComponentStatus, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ComponentStatus",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMap
+ """
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ConfigMap",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Endpoints
+ """
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Endpoints",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "CoreV1Event",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRange
+ """
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LimitRange",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ :type container: str
+ :param follow: Follow the log stream of the pod. Defaults to false.
+ :type follow: bool
+ :param 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).
+ :type insecure_skip_tls_verify_backend: bool
+ :param 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.
+ :type limit_bytes: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param previous: Return previous terminated container logs. Defaults to false.
+ :type previous: bool
+ :param 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.
+ :type since_seconds: int
+ :param 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\".
+ :type stream: str
+ :param 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\".
+ :type tail_lines: int
+ :param timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
+ :type timestamps: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param container: The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ :type container: str
+ :param follow: Follow the log stream of the pod. Defaults to false.
+ :type follow: bool
+ :param 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).
+ :type insecure_skip_tls_verify_backend: bool
+ :param 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.
+ :type limit_bytes: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param previous: Return previous terminated container logs. Defaults to false.
+ :type previous: bool
+ :param 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.
+ :type since_seconds: int
+ :param 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\".
+ :type stream: str
+ :param 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\".
+ :type tail_lines: int
+ :param timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
+ :type timestamps: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('container') is not None: # noqa: E501
+ query_params.append(('container', local_var_params['container'])) # noqa: E501
+ if local_var_params.get('follow') is not None: # noqa: E501
+ query_params.append(('follow', local_var_params['follow'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('limit_bytes') is not None: # noqa: E501
+ query_params.append(('limitBytes', local_var_params['limit_bytes'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('previous') is not None: # noqa: E501
+ query_params.append(('previous', local_var_params['previous'])) # noqa: E501
+ if local_var_params.get('since_seconds') is not None: # noqa: E501
+ query_params.append(('sinceSeconds', local_var_params['since_seconds'])) # noqa: E501
+ if local_var_params.get('stream') is not None: # noqa: E501
+ query_params.append(('stream', local_var_params['stream'])) # noqa: E501
+ if local_var_params.get('tail_lines') is not None: # noqa: E501
+ query_params.append(('tailLines', local_var_params['tail_lines'])) # noqa: E501
+ if local_var_params.get('timestamps') is not None: # noqa: E501
+ query_params.append(('timestamps', local_var_params['timestamps'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplate
+ """
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplate",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Secret
+ """
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Secret",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccount
+ """
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccount",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Namespace
+ """
+ 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 name: name of the Namespace (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Namespace
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Namespace",
+ 201: "V1Namespace",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ConfigMap
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ConfigMap
+ """
+ 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 name: name of the ConfigMap (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ConfigMap
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ConfigMap",
+ 201: "V1ConfigMap",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Endpoints
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Endpoints
+ """
+ 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 name: name of the Endpoints (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Endpoints
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Endpoints",
+ 201: "V1Endpoints",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: CoreV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: CoreV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: CoreV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "CoreV1Event",
+ 201: "CoreV1Event",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LimitRange
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1LimitRange
+ """
+ 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 name: name of the LimitRange (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1LimitRange
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1LimitRange",
+ 201: "V1LimitRange",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 201: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolumeClaim
+ """
+ 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 name: name of the PersistentVolumeClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PersistentVolumeClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolumeClaim",
+ 201: "V1PersistentVolumeClaim",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Pod
+ """
+ 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 name: name of the Pod (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Pod
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Pod",
+ 201: "V1Pod",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodTemplate
+ """
+ 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 name: name of the PodTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodTemplate",
+ 201: "V1PodTemplate",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 201: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Scale
+ """
+ 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 name: name of the Scale (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Scale
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Scale",
+ 201: "V1Scale",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ReplicationController
+ """
+ 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 name: name of the ReplicationController (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ReplicationController
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ReplicationController",
+ 201: "V1ReplicationController",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 201: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceQuota
+ """
+ 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 name: name of the ResourceQuota (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceQuota
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceQuota",
+ 201: "V1ResourceQuota",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Secret
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Secret
+ """
+ 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 name: name of the Secret (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Secret
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Secret",
+ 201: "V1Secret",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 201: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ServiceAccount
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceAccount
+ """
+ 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 name: name of the ServiceAccount (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ServiceAccount
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceAccount",
+ 201: "V1ServiceAccount",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Service
+ """
+ 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 name: name of the Service (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Service
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Service",
+ 201: "V1Service",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Node",
+ 201: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Node
+ """
+ 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 name: name of the Node (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1Node
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Node",
+ 201: "V1Node",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 201: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PersistentVolume
+ """
+ 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 name: name of the PersistentVolume (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PersistentVolume
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PersistentVolume",
+ 201: "V1PersistentVolume",
+ 401: None,
+ }
+
+ 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_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/custom_objects_api.py b/kubernetes_asyncio/client/api/custom_objects_api.py
new file mode 100644
index 0000000000..32309df81d
--- /dev/null
+++ b/kubernetes_asyncio/client/api/custom_objects_api.py
@@ -0,0 +1,5708 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class CustomObjectsApi(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 create_cluster_custom_object(self, group, version, plural, body, **kwargs): # noqa: E501
+ """create_cluster_custom_object # noqa: E501
+
+ Creates a cluster scoped Custom object # 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_cluster_custom_object(group, version, plural, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param body: The JSON schema of the Resource to create. (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_cluster_custom_object_with_http_info(group, version, plural, body, **kwargs) # noqa: E501
+
+ def create_cluster_custom_object_with_http_info(self, group, version, plural, body, **kwargs): # noqa: E501
+ """create_cluster_custom_object # noqa: E501
+
+ Creates a cluster scoped Custom object # 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_cluster_custom_object_with_http_info(group, version, plural, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param body: The JSON schema of the Resource to create. (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `create_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `create_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `create_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_custom_object(self, group, version, namespace, plural, body, **kwargs): # noqa: E501
+ """create_namespaced_custom_object # noqa: E501
+
+ Creates a namespace scoped Custom object # 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_custom_object(group, version, namespace, plural, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param body: The JSON schema of the Resource to create. (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_custom_object_with_http_info(group, version, namespace, plural, body, **kwargs) # noqa: E501
+
+ def create_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, body, **kwargs): # noqa: E501
+ """create_namespaced_custom_object # noqa: E501
+
+ Creates a namespace scoped Custom object # 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_custom_object_with_http_info(group, version, namespace, plural, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param body: The JSON schema of the Resource to create. (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `create_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `create_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `create_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_cluster_custom_object(self, group, version, plural, name, **kwargs): # noqa: E501
+ """delete_cluster_custom_object # noqa: E501
+
+ Deletes the specified cluster scoped custom object # 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_cluster_custom_object(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_cluster_custom_object_with_http_info(group, version, plural, name, **kwargs) # noqa: E501
+
+ def delete_cluster_custom_object_with_http_info(self, group, version, plural, name, **kwargs): # noqa: E501
+ """delete_cluster_custom_object # noqa: E501
+
+ Deletes the specified cluster scoped custom object # 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_cluster_custom_object_with_http_info(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'grace_period_seconds',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'dry_run',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `delete_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `delete_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `delete_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_cluster_custom_object(self, group, version, plural, **kwargs): # noqa: E501
+ """delete_collection_cluster_custom_object # noqa: E501
+
+ Delete collection of cluster scoped custom objects # 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_cluster_custom_object(group, version, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_cluster_custom_object_with_http_info(group, version, plural, **kwargs) # noqa: E501
+
+ def delete_collection_cluster_custom_object_with_http_info(self, group, version, plural, **kwargs): # noqa: E501
+ """delete_collection_cluster_custom_object # noqa: E501
+
+ Delete collection of cluster scoped custom objects # 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_cluster_custom_object_with_http_info(group, version, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'pretty',
+ 'label_selector',
+ 'grace_period_seconds',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'dry_run',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `delete_collection_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `delete_collection_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `delete_collection_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_custom_object(self, group, version, namespace, plural, **kwargs): # noqa: E501
+ """delete_collection_namespaced_custom_object # noqa: E501
+
+ Delete collection of namespace scoped custom objects # 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_custom_object(group, version, namespace, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_custom_object_with_http_info(group, version, namespace, plural, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, **kwargs): # noqa: E501
+ """delete_collection_namespaced_custom_object # noqa: E501
+
+ Delete collection of namespace scoped custom objects # 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_custom_object_with_http_info(group, version, namespace, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'pretty',
+ 'label_selector',
+ 'grace_period_seconds',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'dry_run',
+ 'field_selector',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `delete_collection_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `delete_collection_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `delete_collection_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_custom_object(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """delete_namespaced_custom_object # noqa: E501
+
+ Deletes the specified namespace scoped custom object # 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_custom_object(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501
+
+ def delete_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """delete_namespaced_custom_object # noqa: E501
+
+ Deletes the specified namespace scoped custom object # 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_custom_object_with_http_info(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type dry_run: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'grace_period_seconds',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'dry_run',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `delete_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `delete_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `delete_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_api_resources(self, group, version, **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(group, version, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_resources_with_http_info(group, version, **kwargs) # noqa: E501
+
+ def get_api_resources_with_http_info(self, group, version, **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(group, version, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_api_resources`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_api_resources`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_cluster_custom_object(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object # noqa: E501
+
+ Returns a cluster scoped custom object # 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_cluster_custom_object(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_cluster_custom_object_with_http_info(group, version, plural, name, **kwargs) # noqa: E501
+
+ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object # noqa: E501
+
+ Returns a cluster scoped custom object # 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_cluster_custom_object_with_http_info(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_cluster_custom_object_scale(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object_scale # noqa: E501
+
+ read scale of the specified custom object # 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_cluster_custom_object_scale(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_cluster_custom_object_scale_with_http_info(group, version, plural, name, **kwargs) # noqa: E501
+
+ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object_scale # noqa: E501
+
+ read scale of the specified custom object # 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_cluster_custom_object_scale_with_http_info(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/scale', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_cluster_custom_object_status(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object_status # noqa: E501
+
+ read status of the specified cluster scoped custom object # 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_cluster_custom_object_status(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_cluster_custom_object_status_with_http_info(group, version, plural, name, **kwargs) # noqa: E501
+
+ def get_cluster_custom_object_status_with_http_info(self, group, version, plural, name, **kwargs): # noqa: E501
+ """get_cluster_custom_object_status # noqa: E501
+
+ read status of the specified cluster scoped custom object # 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_cluster_custom_object_status_with_http_info(group, version, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_namespaced_custom_object(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object # noqa: E501
+
+ Returns a namespace scoped custom object # 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_namespaced_custom_object(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501
+
+ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object # noqa: E501
+
+ Returns a namespace scoped custom object # 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_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_namespaced_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_namespaced_custom_object_scale(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object_scale # noqa: E501
+
+ read scale of the specified namespace scoped custom object # 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_namespaced_custom_object_scale(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501
+
+ def get_namespaced_custom_object_scale_with_http_info(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object_scale # noqa: E501
+
+ read scale of the specified namespace scoped custom object # 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_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_namespaced_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def get_namespaced_custom_object_status(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object_status # noqa: E501
+
+ read status of the specified namespace scoped custom object # 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_namespaced_custom_object_status(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501
+
+ def get_namespaced_custom_object_status_with_http_info(self, group, version, namespace, plural, name, **kwargs): # noqa: E501
+ """get_namespaced_custom_object_status # noqa: E501
+
+ read status of the specified namespace scoped custom object # 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_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_namespaced_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cluster_custom_object(self, group, version, plural, **kwargs): # noqa: E501
+ """list_cluster_custom_object # noqa: E501
+
+ list or watch cluster scoped custom objects # 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_cluster_custom_object(group, version, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cluster_custom_object_with_http_info(group, version, plural, **kwargs) # noqa: E501
+
+ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kwargs): # noqa: E501
+ """list_cluster_custom_object # noqa: E501
+
+ list or watch cluster scoped custom objects # 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_cluster_custom_object_with_http_info(group, version, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `list_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `list_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `list_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/json;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_custom_object_for_all_namespaces(self, group, version, resource_plural, **kwargs): # noqa: E501
+ """list_custom_object_for_all_namespaces # noqa: E501
+
+ list or watch namespace scoped custom objects # 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_custom_object_for_all_namespaces(group, version, resource_plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type resource_plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_custom_object_for_all_namespaces_with_http_info(group, version, resource_plural, **kwargs) # noqa: E501
+
+ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, resource_plural, **kwargs): # noqa: E501
+ """list_custom_object_for_all_namespaces # noqa: E501
+
+ list or watch namespace scoped custom objects # 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_custom_object_for_all_namespaces_with_http_info(group, version, resource_plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type resource_plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'resource_plural',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `list_custom_object_for_all_namespaces`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `list_custom_object_for_all_namespaces`") # noqa: E501
+ # verify the required parameter 'resource_plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('resource_plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `resource_plural` when calling `list_custom_object_for_all_namespaces`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'resource_plural' in local_var_params:
+ path_params['resource_plural'] = local_var_params['resource_plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/json;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{resource_plural}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_custom_object(self, group, version, namespace, plural, **kwargs): # noqa: E501
+ """list_namespaced_custom_object # noqa: E501
+
+ list or watch namespace scoped custom objects # 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_custom_object(group, version, namespace, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_custom_object_with_http_info(group, version, namespace, plural, **kwargs) # noqa: E501
+
+ def list_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, **kwargs): # noqa: E501
+ """list_namespaced_custom_object # noqa: E501
+
+ list or watch namespace scoped custom objects # 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_custom_object_with_http_info(group, version, namespace, plural, async_req=True)
+ >>> result = thread.get()
+
+ :param group: The custom resource's group name (required)
+ :type group: str
+ :param version: The custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param pretty: If 'true', then the output is pretty printed.
+ :type pretty: str
+ :param 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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `list_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `list_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `list_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/json;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_custom_object(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object # noqa: E501
+
+ patch the specified cluster scoped custom object # 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_cluster_custom_object(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to patch. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_custom_object_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_custom_object_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object # noqa: E501
+
+ patch the specified cluster scoped custom object # 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_cluster_custom_object_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to patch. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_custom_object_scale(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object_scale # noqa: E501
+
+ partially update scale of the specified cluster scoped custom object # 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_cluster_custom_object_scale(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object_scale # noqa: E501
+
+ partially update scale of the specified cluster scoped custom object # 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_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/scale', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_custom_object_status(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object_status # noqa: E501
+
+ partially update status of the specified cluster scoped custom object # 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_cluster_custom_object_status(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_custom_object_status_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_custom_object_status_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """patch_cluster_custom_object_status # noqa: E501
+
+ partially update status of the specified cluster scoped custom object # 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_cluster_custom_object_status_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object # noqa: E501
+
+ patch the specified namespace scoped custom object # 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_custom_object(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to patch. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object # noqa: E501
+
+ patch the specified namespace scoped custom object # 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_custom_object_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to patch. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_custom_object_scale(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object_scale # noqa: E501
+
+ partially update scale of the specified namespace scoped custom object # 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_custom_object_scale(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object_scale # noqa: E501
+
+ partially update scale of the specified namespace scoped custom object # 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_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_custom_object_status(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object_status # noqa: E501
+
+ partially update status of the specified namespace scoped custom object # 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_custom_object_status(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_custom_object_status_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """patch_namespaced_custom_object_status # noqa: E501
+
+ partially update status of the specified namespace scoped custom object # 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_custom_object_status_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_custom_object(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object # noqa: E501
+
+ replace the specified cluster scoped custom object # 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_cluster_custom_object(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to replace. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_custom_object_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_custom_object_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object # noqa: E501
+
+ replace the specified cluster scoped custom object # 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_cluster_custom_object_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to replace. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_custom_object_scale(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object_scale # noqa: E501
+
+ replace scale of the specified cluster scoped custom object # 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_cluster_custom_object_scale(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object_scale # noqa: E501
+
+ replace scale of the specified cluster scoped custom object # 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_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/scale', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_custom_object_status(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object_status # noqa: E501
+
+ replace status of the cluster scoped specified custom object # 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_cluster_custom_object_status(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_custom_object_status_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_custom_object_status_with_http_info(self, group, version, plural, name, body, **kwargs): # noqa: E501
+ """replace_cluster_custom_object_status # noqa: E501
+
+ replace status of the cluster scoped specified custom object # 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_cluster_custom_object_status_with_http_info(group, version, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/{plural}/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object # noqa: E501
+
+ replace the specified namespace scoped custom object # 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_custom_object(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to replace. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_custom_object_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object # noqa: E501
+
+ replace the specified namespace scoped custom object # 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_custom_object_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: The JSON schema of the Resource to replace. (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_custom_object_scale(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object_scale # noqa: E501
+
+ replace scale of the specified namespace scoped custom object # 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_custom_object_scale(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object_scale # noqa: E501
+
+ replace scale of the specified namespace scoped custom object # 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_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object_scale" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object_scale`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_custom_object_status(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object_status # noqa: E501
+
+ replace status of the specified namespace scoped custom object # 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_custom_object_status(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_custom_object_status_with_http_info(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501
+ """replace_namespaced_custom_object_status # noqa: E501
+
+ replace status of the specified namespace scoped custom object # 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_custom_object_status_with_http_info(group, version, namespace, plural, name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param group: the custom resource's group (required)
+ :type group: str
+ :param version: the custom resource's version (required)
+ :type version: str
+ :param namespace: The custom resource's namespace (required)
+ :type namespace: str
+ :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
+ :type plural: str
+ :param name: the custom object's name (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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. (optional)
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'group',
+ 'version',
+ 'namespace',
+ 'plural',
+ 'name',
+ 'body',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_custom_object_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'group' is set
+ if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'version' is set
+ if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'plural' is set
+ if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'group' in local_var_params:
+ path_params['group'] = local_var_params['group'] # noqa: E501
+ if 'version' in local_var_params:
+ path_params['version'] = local_var_params['version'] # noqa: E501
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+ if 'plural' in local_var_params:
+ path_params['plural'] = local_var_params['plural'] # noqa: E501
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "object",
+ 201: "object",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/discovery_api.py b/kubernetes_asyncio/client/api/discovery_api.py
new file mode 100644
index 0000000000..ce39eebfb8
--- /dev/null
+++ b/kubernetes_asyncio/client/api/discovery_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class DiscoveryApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/discovery_v1_api.py b/kubernetes_asyncio/client/api/discovery_v1_api.py
new file mode 100644
index 0000000000..e6789d2ba5
--- /dev/null
+++ b/kubernetes_asyncio/client/api/discovery_v1_api.py
@@ -0,0 +1,1748 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class DiscoveryV1Api(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 create_namespaced_endpoint_slice(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_endpoint_slice # noqa: E501
+
+ create an EndpointSlice # 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_endpoint_slice(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1EndpointSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_endpoint_slice_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_endpoint_slice # noqa: E501
+
+ create an EndpointSlice # 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_endpoint_slice_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1EndpointSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_endpoint_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointSlice",
+ 201: "V1EndpointSlice",
+ 202: "V1EndpointSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_endpoint_slice(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_endpoint_slice # noqa: E501
+
+ delete collection of EndpointSlice # 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_endpoint_slice(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_endpoint_slice_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_endpoint_slice # noqa: E501
+
+ delete collection of EndpointSlice # 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_endpoint_slice_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_endpoint_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_endpoint_slice # noqa: E501
+
+ delete an EndpointSlice # 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_endpoint_slice(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_endpoint_slice_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_endpoint_slice # noqa: E501
+
+ delete an EndpointSlice # 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_endpoint_slice_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_endpoint_slice`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_endpoint_slice_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_endpoint_slice_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind EndpointSlice # 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_endpoint_slice_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSliceList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_endpoint_slice_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_endpoint_slice_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind EndpointSlice # 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_endpoint_slice_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointSliceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/endpointslices', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_endpoint_slice(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_endpoint_slice # noqa: E501
+
+ list or watch objects of kind EndpointSlice # 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_endpoint_slice(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSliceList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_endpoint_slice_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_endpoint_slice # noqa: E501
+
+ list or watch objects of kind EndpointSlice # 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_endpoint_slice_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_endpoint_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointSliceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_endpoint_slice # noqa: E501
+
+ partially update the specified EndpointSlice # 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_endpoint_slice(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_endpoint_slice_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_endpoint_slice # noqa: E501
+
+ partially update the specified EndpointSlice # 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_endpoint_slice_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoint_slice`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1EndpointSlice",
+ 201: "V1EndpointSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_endpoint_slice # noqa: E501
+
+ read the specified EndpointSlice # 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_endpoint_slice(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_endpoint_slice_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_endpoint_slice # noqa: E501
+
+ read the specified EndpointSlice # 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_endpoint_slice_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_endpoint_slice`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_endpoint_slice # noqa: E501
+
+ replace the specified EndpointSlice # 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_endpoint_slice(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1EndpointSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1EndpointSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_endpoint_slice_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_endpoint_slice # noqa: E501
+
+ replace the specified EndpointSlice # 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_endpoint_slice_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the EndpointSlice (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1EndpointSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_endpoint_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_endpoint_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoint_slice`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1EndpointSlice",
+ 201: "V1EndpointSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/events_api.py b/kubernetes_asyncio/client/api/events_api.py
new file mode 100644
index 0000000000..7c7956b24c
--- /dev/null
+++ b/kubernetes_asyncio/client/api/events_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class EventsApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/events_v1_api.py b/kubernetes_asyncio/client/api/events_v1_api.py
new file mode 100644
index 0000000000..b7cad59d65
--- /dev/null
+++ b/kubernetes_asyncio/client/api/events_v1_api.py
@@ -0,0 +1,1748 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class EventsV1Api(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 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: EventsV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1Event
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: EventsV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "EventsV1Event",
+ 201: "EventsV1Event",
+ 202: "EventsV1Event",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1EventList
+ """
+ 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 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "EventsV1EventList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/events', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1EventList
+ """
+ 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 namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "EventsV1EventList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "EventsV1Event",
+ 201: "EventsV1Event",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "EventsV1Event",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: EventsV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: EventsV1Event
+ """
+ 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 name: name of the Event (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: EventsV1Event
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "EventsV1Event",
+ 201: "EventsV1Event",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/flowcontrol_apiserver_api.py b/kubernetes_asyncio/client/api/flowcontrol_apiserver_api.py
new file mode 100644
index 0000000000..697d249476
--- /dev/null
+++ b/kubernetes_asyncio/client/api/flowcontrol_apiserver_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class FlowcontrolApiserverApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/flowcontrol_apiserver_v1_api.py b/kubernetes_asyncio/client/api/flowcontrol_apiserver_v1_api.py
new file mode 100644
index 0000000000..95d117a117
--- /dev/null
+++ b/kubernetes_asyncio/client/api/flowcontrol_apiserver_v1_api.py
@@ -0,0 +1,3809 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class FlowcontrolApiserverV1Api(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 create_flow_schema(self, body, **kwargs): # noqa: E501
+ """create_flow_schema # noqa: E501
+
+ create a FlowSchema # 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_flow_schema(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_flow_schema_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_flow_schema # noqa: E501
+
+ create a FlowSchema # 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_flow_schema_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_flow_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 201: "V1FlowSchema",
+ 202: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_priority_level_configuration(self, body, **kwargs): # noqa: E501
+ """create_priority_level_configuration # noqa: E501
+
+ create a PriorityLevelConfiguration # 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_priority_level_configuration(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_priority_level_configuration_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_priority_level_configuration # noqa: E501
+
+ create a PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_priority_level_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 201: "V1PriorityLevelConfiguration",
+ 202: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_flow_schema(self, **kwargs): # noqa: E501
+ """delete_collection_flow_schema # noqa: E501
+
+ delete collection of FlowSchema # 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_flow_schema(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_flow_schema_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_flow_schema # noqa: E501
+
+ delete collection of FlowSchema # 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_flow_schema_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_priority_level_configuration(self, **kwargs): # noqa: E501
+ """delete_collection_priority_level_configuration # noqa: E501
+
+ delete collection of PriorityLevelConfiguration # 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_priority_level_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_priority_level_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_priority_level_configuration # noqa: E501
+
+ delete collection of PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_flow_schema(self, name, **kwargs): # noqa: E501
+ """delete_flow_schema # noqa: E501
+
+ delete a FlowSchema # 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_flow_schema(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_flow_schema_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_flow_schema # noqa: E501
+
+ delete a FlowSchema # 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_flow_schema_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_flow_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_priority_level_configuration(self, name, **kwargs): # noqa: E501
+ """delete_priority_level_configuration # noqa: E501
+
+ delete a PriorityLevelConfiguration # 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_priority_level_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_priority_level_configuration # noqa: E501
+
+ delete a PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_priority_level_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_flow_schema(self, **kwargs): # noqa: E501
+ """list_flow_schema # noqa: E501
+
+ list or watch objects of kind FlowSchema # 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_flow_schema(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchemaList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_flow_schema_with_http_info(**kwargs) # noqa: E501
+
+ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501
+ """list_flow_schema # noqa: E501
+
+ list or watch objects of kind FlowSchema # 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_flow_schema_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchemaList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchemaList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_priority_level_configuration(self, **kwargs): # noqa: E501
+ """list_priority_level_configuration # noqa: E501
+
+ list or watch objects of kind PriorityLevelConfiguration # 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_priority_level_configuration(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfigurationList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_priority_level_configuration_with_http_info(**kwargs) # noqa: E501
+
+ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E501
+ """list_priority_level_configuration # noqa: E501
+
+ list or watch objects of kind PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfigurationList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfigurationList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_flow_schema(self, name, body, **kwargs): # noqa: E501
+ """patch_flow_schema # noqa: E501
+
+ partially update the specified FlowSchema # 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_flow_schema(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_flow_schema # noqa: E501
+
+ partially update the specified FlowSchema # 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_flow_schema_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 201: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_flow_schema_status(self, name, body, **kwargs): # noqa: E501
+ """patch_flow_schema_status # noqa: E501
+
+ partially update status of the specified FlowSchema # 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_flow_schema_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_flow_schema_status # noqa: E501
+
+ partially update status of the specified FlowSchema # 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_flow_schema_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 201: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_priority_level_configuration(self, name, body, **kwargs): # noqa: E501
+ """patch_priority_level_configuration # noqa: E501
+
+ partially update the specified PriorityLevelConfiguration # 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_priority_level_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_priority_level_configuration # noqa: E501
+
+ partially update the specified PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 201: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501
+ """patch_priority_level_configuration_status # noqa: E501
+
+ partially update status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_priority_level_configuration_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_priority_level_configuration_status # noqa: E501
+
+ partially update status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 201: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_flow_schema(self, name, **kwargs): # noqa: E501
+ """read_flow_schema # noqa: E501
+
+ read the specified FlowSchema # 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_flow_schema(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_flow_schema_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_flow_schema # noqa: E501
+
+ read the specified FlowSchema # 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_flow_schema_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_flow_schema_status(self, name, **kwargs): # noqa: E501
+ """read_flow_schema_status # noqa: E501
+
+ read status of the specified FlowSchema # 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_flow_schema_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_flow_schema_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_flow_schema_status # noqa: E501
+
+ read status of the specified FlowSchema # 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_flow_schema_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_priority_level_configuration(self, name, **kwargs): # noqa: E501
+ """read_priority_level_configuration # noqa: E501
+
+ read the specified PriorityLevelConfiguration # 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_priority_level_configuration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_priority_level_configuration # noqa: E501
+
+ read the specified PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_priority_level_configuration_status(self, name, **kwargs): # noqa: E501
+ """read_priority_level_configuration_status # noqa: E501
+
+ read status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_priority_level_configuration_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_priority_level_configuration_status # noqa: E501
+
+ read status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_flow_schema(self, name, body, **kwargs): # noqa: E501
+ """replace_flow_schema # noqa: E501
+
+ replace the specified FlowSchema # 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_flow_schema(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_flow_schema # noqa: E501
+
+ replace the specified FlowSchema # 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_flow_schema_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 201: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_flow_schema_status(self, name, body, **kwargs): # noqa: E501
+ """replace_flow_schema_status # noqa: E501
+
+ replace status of the specified FlowSchema # 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_flow_schema_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1FlowSchema
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_flow_schema_status # noqa: E501
+
+ replace status of the specified FlowSchema # 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_flow_schema_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the FlowSchema (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1FlowSchema
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_flow_schema_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1FlowSchema",
+ 201: "V1FlowSchema",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_priority_level_configuration(self, name, body, **kwargs): # noqa: E501
+ """replace_priority_level_configuration # noqa: E501
+
+ replace the specified PriorityLevelConfiguration # 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_priority_level_configuration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_priority_level_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_priority_level_configuration # noqa: E501
+
+ replace the specified PriorityLevelConfiguration # 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_priority_level_configuration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 201: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501
+ """replace_priority_level_configuration_status # noqa: E501
+
+ replace status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PriorityLevelConfiguration
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_priority_level_configuration_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_priority_level_configuration_status # noqa: E501
+
+ replace status of the specified PriorityLevelConfiguration # 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_priority_level_configuration_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PriorityLevelConfiguration (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1PriorityLevelConfiguration
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_priority_level_configuration_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PriorityLevelConfiguration",
+ 201: "V1PriorityLevelConfiguration",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/internal_apiserver_api.py b/kubernetes_asyncio/client/api/internal_apiserver_api.py
new file mode 100644
index 0000000000..6b7112891b
--- /dev/null
+++ b/kubernetes_asyncio/client/api/internal_apiserver_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class InternalApiserverApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/internal_apiserver_v1alpha1_api.py b/kubernetes_asyncio/client/api/internal_apiserver_v1alpha1_api.py
new file mode 100644
index 0000000000..303761c96d
--- /dev/null
+++ b/kubernetes_asyncio/client/api/internal_apiserver_v1alpha1_api.py
@@ -0,0 +1,1987 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class InternalApiserverV1alpha1Api(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 create_storage_version(self, body, **kwargs): # noqa: E501
+ """create_storage_version # noqa: E501
+
+ create a StorageVersion # 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_storage_version(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_storage_version_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_storage_version # noqa: E501
+
+ create a StorageVersion # 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_storage_version_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_storage_version`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 201: "V1alpha1StorageVersion",
+ 202: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_storage_version(self, **kwargs): # noqa: E501
+ """delete_collection_storage_version # noqa: E501
+
+ delete collection of StorageVersion # 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_storage_version(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_storage_version_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_storage_version # noqa: E501
+
+ delete collection of StorageVersion # 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_storage_version_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_storage_version(self, name, **kwargs): # noqa: E501
+ """delete_storage_version # noqa: E501
+
+ delete a StorageVersion # 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_storage_version(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_storage_version_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_storage_version # noqa: E501
+
+ delete a StorageVersion # 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_storage_version_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_version`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_storage_version(self, **kwargs): # noqa: E501
+ """list_storage_version # noqa: E501
+
+ list or watch objects of kind StorageVersion # 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_storage_version(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersionList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_storage_version_with_http_info(**kwargs) # noqa: E501
+
+ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501
+ """list_storage_version # noqa: E501
+
+ list or watch objects of kind StorageVersion # 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_storage_version_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersionList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersionList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_storage_version(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version # noqa: E501
+
+ partially update the specified StorageVersion # 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_storage_version(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_storage_version_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version # noqa: E501
+
+ partially update the specified StorageVersion # 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_storage_version_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 201: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_storage_version_status(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_status # noqa: E501
+
+ partially update status of the specified StorageVersion # 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_storage_version_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_storage_version_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_status # noqa: E501
+
+ partially update status of the specified StorageVersion # 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_storage_version_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 201: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_storage_version(self, name, **kwargs): # noqa: E501
+ """read_storage_version # noqa: E501
+
+ read the specified StorageVersion # 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_storage_version(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_storage_version_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_storage_version # noqa: E501
+
+ read the specified StorageVersion # 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_storage_version_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_storage_version_status(self, name, **kwargs): # noqa: E501
+ """read_storage_version_status # noqa: E501
+
+ read status of the specified StorageVersion # 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_storage_version_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_storage_version_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_storage_version_status # noqa: E501
+
+ read status of the specified StorageVersion # 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_storage_version_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_storage_version(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version # noqa: E501
+
+ replace the specified StorageVersion # 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_storage_version(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_storage_version_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version # noqa: E501
+
+ replace the specified StorageVersion # 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_storage_version_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 201: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_storage_version_status(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_status # noqa: E501
+
+ replace status of the specified StorageVersion # 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_storage_version_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha1StorageVersion
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_storage_version_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_status # noqa: E501
+
+ replace status of the specified StorageVersion # 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_storage_version_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the StorageVersion (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha1StorageVersion
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_storage_version_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha1StorageVersion",
+ 201: "V1alpha1StorageVersion",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/logs_api.py b/kubernetes_asyncio/client/api/logs_api.py
new file mode 100644
index 0000000000..4aac1fcef3
--- /dev/null
+++ b/kubernetes_asyncio/client/api/logs_api.py
@@ -0,0 +1,285 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class LogsApi(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 log_file_handler(self, logpath, **kwargs): # noqa: E501
+ """log_file_handler # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.log_file_handler(logpath, async_req=True)
+ >>> result = thread.get()
+
+ :param logpath: path to the log (required)
+ :type logpath: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.log_file_handler_with_http_info(logpath, **kwargs) # noqa: E501
+
+ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501
+ """log_file_handler # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.log_file_handler_with_http_info(logpath, async_req=True)
+ >>> result = thread.get()
+
+ :param logpath: path to the log (required)
+ :type logpath: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'logpath'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 log_file_handler" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'logpath' is set
+ if self.api_client.client_side_validation and local_var_params.get('logpath') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `logpath` when calling `log_file_handler`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'logpath' in local_var_params:
+ path_params['logpath'] = local_var_params['logpath'] # noqa: E501
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {}
+
+ return self.api_client.call_api(
+ '/logs/{logpath}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def log_file_list_handler(self, **kwargs): # noqa: E501
+ """log_file_list_handler # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.log_file_list_handler(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.log_file_list_handler_with_http_info(**kwargs) # noqa: E501
+
+ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501
+ """log_file_list_handler # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.log_file_list_handler_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 log_file_list_handler" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {}
+
+ return self.api_client.call_api(
+ '/logs/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/networking_api.py b/kubernetes_asyncio/client/api/networking_api.py
new file mode 100644
index 0000000000..3f8a6241ba
--- /dev/null
+++ b/kubernetes_asyncio/client/api/networking_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class NetworkingApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/networking_v1_api.py b/kubernetes_asyncio/client/api/networking_v1_api.py
new file mode 100644
index 0000000000..2471785de5
--- /dev/null
+++ b/kubernetes_asyncio/client/api/networking_v1_api.py
@@ -0,0 +1,8313 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class NetworkingV1Api(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 create_ingress_class(self, body, **kwargs): # noqa: E501
+ """create_ingress_class # noqa: E501
+
+ create an IngressClass # 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_ingress_class(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1IngressClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_ingress_class_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_ingress_class # noqa: E501
+
+ create an IngressClass # 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_ingress_class_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1IngressClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_ingress_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressClass",
+ 201: "V1IngressClass",
+ 202: "V1IngressClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_ip_address(self, body, **kwargs): # noqa: E501
+ """create_ip_address # noqa: E501
+
+ create an IPAddress # 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_ip_address(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_ip_address_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_ip_address # noqa: E501
+
+ create an IPAddress # 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_ip_address_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IPAddress",
+ 201: "V1IPAddress",
+ 202: "V1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_ingress(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_ingress # noqa: E501
+
+ create an Ingress # 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_ingress(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_ingress_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_ingress # noqa: E501
+
+ create an Ingress # 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_ingress_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_ingress`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 201: "V1Ingress",
+ 202: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_network_policy(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_network_policy # noqa: E501
+
+ create a NetworkPolicy # 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_network_policy(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1NetworkPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_network_policy_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_network_policy # noqa: E501
+
+ create a NetworkPolicy # 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_network_policy_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1NetworkPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_network_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NetworkPolicy",
+ 201: "V1NetworkPolicy",
+ 202: "V1NetworkPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_service_cidr(self, body, **kwargs): # noqa: E501
+ """create_service_cidr # noqa: E501
+
+ create a ServiceCIDR # 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_service_cidr(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_service_cidr # noqa: E501
+
+ create a ServiceCIDR # 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_service_cidr_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 201: "V1ServiceCIDR",
+ 202: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_ingress_class(self, **kwargs): # noqa: E501
+ """delete_collection_ingress_class # noqa: E501
+
+ delete collection of IngressClass # 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_ingress_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_ingress_class_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_ingress_class # noqa: E501
+
+ delete collection of IngressClass # 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_ingress_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_ip_address(self, **kwargs): # noqa: E501
+ """delete_collection_ip_address # noqa: E501
+
+ delete collection of IPAddress # 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_ip_address(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_ip_address_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_ip_address # noqa: E501
+
+ delete collection of IPAddress # 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_ip_address_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_ingress(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_ingress # noqa: E501
+
+ delete collection of Ingress # 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_ingress(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_ingress # noqa: E501
+
+ delete collection of Ingress # 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_ingress_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_ingress`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_network_policy # noqa: E501
+
+ delete collection of NetworkPolicy # 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_network_policy(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_network_policy # noqa: E501
+
+ delete collection of NetworkPolicy # 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_network_policy_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_network_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_service_cidr(self, **kwargs): # noqa: E501
+ """delete_collection_service_cidr # noqa: E501
+
+ delete collection of ServiceCIDR # 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_service_cidr(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_service_cidr_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_service_cidr # noqa: E501
+
+ delete collection of ServiceCIDR # 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_service_cidr_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_ingress_class(self, name, **kwargs): # noqa: E501
+ """delete_ingress_class # noqa: E501
+
+ delete an IngressClass # 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_ingress_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_ingress_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_ingress_class # noqa: E501
+
+ delete an IngressClass # 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_ingress_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_ingress_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_ip_address(self, name, **kwargs): # noqa: E501
+ """delete_ip_address # noqa: E501
+
+ delete an IPAddress # 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_ip_address(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_ip_address_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_ip_address_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_ip_address # noqa: E501
+
+ delete an IPAddress # 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_ip_address_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_ingress # noqa: E501
+
+ delete an Ingress # 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_ingress(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_ingress # noqa: E501
+
+ delete an Ingress # 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_ingress_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_ingress`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_network_policy # noqa: E501
+
+ delete a NetworkPolicy # 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_network_policy(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_network_policy # noqa: E501
+
+ delete a NetworkPolicy # 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_network_policy_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_network_policy`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_service_cidr(self, name, **kwargs): # noqa: E501
+ """delete_service_cidr # noqa: E501
+
+ delete a ServiceCIDR # 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_service_cidr(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_service_cidr_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_service_cidr # noqa: E501
+
+ delete a ServiceCIDR # 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_service_cidr_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_ingress_class(self, **kwargs): # noqa: E501
+ """list_ingress_class # noqa: E501
+
+ list or watch objects of kind IngressClass # 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_ingress_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressClassList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_ingress_class_with_http_info(**kwargs) # noqa: E501
+
+ def list_ingress_class_with_http_info(self, **kwargs): # noqa: E501
+ """list_ingress_class # noqa: E501
+
+ list or watch objects of kind IngressClass # 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_ingress_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressClassList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressClassList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_ingress_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_ingress_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Ingress # 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_ingress_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_ingress_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_ingress_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Ingress # 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_ingress_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingresses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_ip_address(self, **kwargs): # noqa: E501
+ """list_ip_address # noqa: E501
+
+ list or watch objects of kind IPAddress # 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_ip_address(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IPAddressList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_ip_address_with_http_info(**kwargs) # noqa: E501
+
+ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501
+ """list_ip_address # noqa: E501
+
+ list or watch objects of kind IPAddress # 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_ip_address_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IPAddressList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IPAddressList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_ingress(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_ingress # noqa: E501
+
+ list or watch objects of kind Ingress # 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_ingress(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_ingress # noqa: E501
+
+ list or watch objects of kind Ingress # 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_ingress_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_ingress`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_network_policy # noqa: E501
+
+ list or watch objects of kind NetworkPolicy # 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_network_policy(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicyList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_network_policy # noqa: E501
+
+ list or watch objects of kind NetworkPolicy # 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_network_policy_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_network_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NetworkPolicyList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_network_policy_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_network_policy_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind NetworkPolicy # 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_network_policy_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicyList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_network_policy_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_network_policy_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind NetworkPolicy # 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_network_policy_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NetworkPolicyList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/networkpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_service_cidr(self, **kwargs): # noqa: E501
+ """list_service_cidr # noqa: E501
+
+ list or watch objects of kind ServiceCIDR # 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_cidr(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDRList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_service_cidr_with_http_info(**kwargs) # noqa: E501
+
+ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501
+ """list_service_cidr # noqa: E501
+
+ list or watch objects of kind ServiceCIDR # 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_cidr_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cidr" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDRList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_ingress_class(self, name, body, **kwargs): # noqa: E501
+ """patch_ingress_class # noqa: E501
+
+ partially update the specified IngressClass # 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_ingress_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_ingress_class # noqa: E501
+
+ partially update the specified IngressClass # 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_ingress_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_ingress_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_ingress_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1IngressClass",
+ 201: "V1IngressClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_ip_address(self, name, body, **kwargs): # noqa: E501
+ """patch_ip_address # noqa: E501
+
+ partially update the specified IPAddress # 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_ip_address(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_ip_address_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_ip_address # noqa: E501
+
+ partially update the specified IPAddress # 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_ip_address_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_ip_address`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1IPAddress",
+ 201: "V1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_ingress # noqa: E501
+
+ partially update the specified Ingress # 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_ingress(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_ingress # noqa: E501
+
+ partially update the specified Ingress # 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_ingress_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 201: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_ingress_status # noqa: E501
+
+ partially update status of the specified Ingress # 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_ingress_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_ingress_status # noqa: E501
+
+ partially update status of the specified Ingress # 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_ingress_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 201: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_network_policy # noqa: E501
+
+ partially update the specified NetworkPolicy # 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_network_policy(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_network_policy # noqa: E501
+
+ partially update the specified NetworkPolicy # 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_network_policy_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_network_policy`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1NetworkPolicy",
+ 201: "V1NetworkPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_service_cidr(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr # noqa: E501
+
+ partially update the specified ServiceCIDR # 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_service_cidr(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr # noqa: E501
+
+ partially update the specified ServiceCIDR # 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_service_cidr_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 201: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_service_cidr_status(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr_status # noqa: E501
+
+ partially update status of the specified ServiceCIDR # 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_service_cidr_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr_status # noqa: E501
+
+ partially update status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 201: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_ingress_class(self, name, **kwargs): # noqa: E501
+ """read_ingress_class # noqa: E501
+
+ read the specified IngressClass # 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_ingress_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_ingress_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_ingress_class # noqa: E501
+
+ read the specified IngressClass # 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_ingress_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_ingress_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_ip_address(self, name, **kwargs): # noqa: E501
+ """read_ip_address # noqa: E501
+
+ read the specified IPAddress # 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_ip_address(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_ip_address_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_ip_address # noqa: E501
+
+ read the specified IPAddress # 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_ip_address_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_ingress # noqa: E501
+
+ read the specified Ingress # 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_ingress(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_ingress # noqa: E501
+
+ read the specified Ingress # 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_ingress_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_ingress_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_ingress_status # noqa: E501
+
+ read status of the specified Ingress # 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_ingress_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_ingress_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_ingress_status # noqa: E501
+
+ read status of the specified Ingress # 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_ingress_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_network_policy # noqa: E501
+
+ read the specified NetworkPolicy # 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_network_policy(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_network_policy # noqa: E501
+
+ read the specified NetworkPolicy # 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_network_policy_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_network_policy`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NetworkPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_service_cidr(self, name, **kwargs): # noqa: E501
+ """read_service_cidr # noqa: E501
+
+ read the specified ServiceCIDR # 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_service_cidr(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_service_cidr_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_service_cidr # noqa: E501
+
+ read the specified ServiceCIDR # 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_service_cidr_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_service_cidr_status(self, name, **kwargs): # noqa: E501
+ """read_service_cidr_status # noqa: E501
+
+ read status of the specified ServiceCIDR # 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_service_cidr_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_service_cidr_status # noqa: E501
+
+ read status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_ingress_class(self, name, body, **kwargs): # noqa: E501
+ """replace_ingress_class # noqa: E501
+
+ replace the specified IngressClass # 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_ingress_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1IngressClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IngressClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_ingress_class # noqa: E501
+
+ replace the specified IngressClass # 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_ingress_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IngressClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1IngressClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_ingress_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_ingress_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IngressClass",
+ 201: "V1IngressClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_ip_address(self, name, body, **kwargs): # noqa: E501
+ """replace_ip_address # noqa: E501
+
+ replace the specified IPAddress # 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_ip_address(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_ip_address # noqa: E501
+
+ replace the specified IPAddress # 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_ip_address_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_ip_address`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1IPAddress",
+ 201: "V1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_ingress # noqa: E501
+
+ replace the specified Ingress # 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_ingress(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_ingress # noqa: E501
+
+ replace the specified Ingress # 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_ingress_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 201: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_ingress_status # noqa: E501
+
+ replace status of the specified Ingress # 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_ingress_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Ingress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_ingress_status # noqa: E501
+
+ replace status of the specified Ingress # 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_ingress_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Ingress (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Ingress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ingress_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Ingress",
+ 201: "V1Ingress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_network_policy # noqa: E501
+
+ replace the specified NetworkPolicy # 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_network_policy(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1NetworkPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1NetworkPolicy
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_network_policy # noqa: E501
+
+ replace the specified NetworkPolicy # 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_network_policy_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the NetworkPolicy (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1NetworkPolicy
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_network_policy" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_network_policy`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_network_policy`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1NetworkPolicy",
+ 201: "V1NetworkPolicy",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_service_cidr(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr # noqa: E501
+
+ replace the specified ServiceCIDR # 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_service_cidr(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr # noqa: E501
+
+ replace the specified ServiceCIDR # 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_service_cidr_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 201: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_service_cidr_status(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr_status # noqa: E501
+
+ replace status of the specified ServiceCIDR # 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_service_cidr_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr_status # noqa: E501
+
+ replace status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ServiceCIDR",
+ 201: "V1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/networking_v1beta1_api.py b/kubernetes_asyncio/client/api/networking_v1beta1_api.py
new file mode 100644
index 0000000000..e983454557
--- /dev/null
+++ b/kubernetes_asyncio/client/api/networking_v1beta1_api.py
@@ -0,0 +1,3295 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class NetworkingV1beta1Api(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 create_ip_address(self, body, **kwargs): # noqa: E501
+ """create_ip_address # noqa: E501
+
+ create an IPAddress # 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_ip_address(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_ip_address_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_ip_address # noqa: E501
+
+ create an IPAddress # 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_ip_address_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1IPAddress",
+ 201: "V1beta1IPAddress",
+ 202: "V1beta1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_service_cidr(self, body, **kwargs): # noqa: E501
+ """create_service_cidr # noqa: E501
+
+ create a ServiceCIDR # 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_service_cidr(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_service_cidr # noqa: E501
+
+ create a ServiceCIDR # 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_service_cidr_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 201: "V1beta1ServiceCIDR",
+ 202: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_ip_address(self, **kwargs): # noqa: E501
+ """delete_collection_ip_address # noqa: E501
+
+ delete collection of IPAddress # 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_ip_address(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_ip_address_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_ip_address # noqa: E501
+
+ delete collection of IPAddress # 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_ip_address_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_service_cidr(self, **kwargs): # noqa: E501
+ """delete_collection_service_cidr # noqa: E501
+
+ delete collection of ServiceCIDR # 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_service_cidr(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_service_cidr_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_service_cidr # noqa: E501
+
+ delete collection of ServiceCIDR # 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_service_cidr_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_ip_address(self, name, **kwargs): # noqa: E501
+ """delete_ip_address # noqa: E501
+
+ delete an IPAddress # 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_ip_address(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_ip_address_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_ip_address_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_ip_address # noqa: E501
+
+ delete an IPAddress # 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_ip_address_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_service_cidr(self, name, **kwargs): # noqa: E501
+ """delete_service_cidr # noqa: E501
+
+ delete a ServiceCIDR # 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_service_cidr(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_service_cidr_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_service_cidr # noqa: E501
+
+ delete a ServiceCIDR # 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_service_cidr_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_ip_address(self, **kwargs): # noqa: E501
+ """list_ip_address # noqa: E501
+
+ list or watch objects of kind IPAddress # 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_ip_address(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1IPAddressList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_ip_address_with_http_info(**kwargs) # noqa: E501
+
+ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501
+ """list_ip_address # noqa: E501
+
+ list or watch objects of kind IPAddress # 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_ip_address_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1IPAddressList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1IPAddressList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_service_cidr(self, **kwargs): # noqa: E501
+ """list_service_cidr # noqa: E501
+
+ list or watch objects of kind ServiceCIDR # 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_cidr(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDRList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_service_cidr_with_http_info(**kwargs) # noqa: E501
+
+ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501
+ """list_service_cidr # noqa: E501
+
+ list or watch objects of kind ServiceCIDR # 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_cidr_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cidr" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDRList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_ip_address(self, name, body, **kwargs): # noqa: E501
+ """patch_ip_address # noqa: E501
+
+ partially update the specified IPAddress # 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_ip_address(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_ip_address_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_ip_address # noqa: E501
+
+ partially update the specified IPAddress # 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_ip_address_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_ip_address`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1IPAddress",
+ 201: "V1beta1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_service_cidr(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr # noqa: E501
+
+ partially update the specified ServiceCIDR # 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_service_cidr(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr # noqa: E501
+
+ partially update the specified ServiceCIDR # 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_service_cidr_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 201: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_service_cidr_status(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr_status # noqa: E501
+
+ partially update status of the specified ServiceCIDR # 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_service_cidr_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_service_cidr_status # noqa: E501
+
+ partially update status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 201: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_ip_address(self, name, **kwargs): # noqa: E501
+ """read_ip_address # noqa: E501
+
+ read the specified IPAddress # 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_ip_address(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_ip_address_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_ip_address # noqa: E501
+
+ read the specified IPAddress # 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_ip_address_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_service_cidr(self, name, **kwargs): # noqa: E501
+ """read_service_cidr # noqa: E501
+
+ read the specified ServiceCIDR # 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_service_cidr(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_service_cidr_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_service_cidr # noqa: E501
+
+ read the specified ServiceCIDR # 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_service_cidr_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_service_cidr_status(self, name, **kwargs): # noqa: E501
+ """read_service_cidr_status # noqa: E501
+
+ read status of the specified ServiceCIDR # 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_service_cidr_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_service_cidr_status # noqa: E501
+
+ read status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_ip_address(self, name, body, **kwargs): # noqa: E501
+ """replace_ip_address # noqa: E501
+
+ replace the specified IPAddress # 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_ip_address(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1IPAddress
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_ip_address # noqa: E501
+
+ replace the specified IPAddress # 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_ip_address_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the IPAddress (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1IPAddress
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_ip_address" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_ip_address`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_ip_address`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1IPAddress",
+ 201: "V1beta1IPAddress",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_service_cidr(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr # noqa: E501
+
+ replace the specified ServiceCIDR # 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_service_cidr(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr # noqa: E501
+
+ replace the specified ServiceCIDR # 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_service_cidr_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 201: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_service_cidr_status(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr_status # noqa: E501
+
+ replace status of the specified ServiceCIDR # 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_service_cidr_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ServiceCIDR
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_service_cidr_status # noqa: E501
+
+ replace status of the specified ServiceCIDR # 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_service_cidr_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ServiceCIDR (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1beta1ServiceCIDR
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_cidr_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ServiceCIDR",
+ 201: "V1beta1ServiceCIDR",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/node_api.py b/kubernetes_asyncio/client/api/node_api.py
new file mode 100644
index 0000000000..8154a0f0ee
--- /dev/null
+++ b/kubernetes_asyncio/client/api/node_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class NodeApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/node_v1_api.py b/kubernetes_asyncio/client/api/node_v1_api.py
new file mode 100644
index 0000000000..923752e2e0
--- /dev/null
+++ b/kubernetes_asyncio/client/api/node_v1_api.py
@@ -0,0 +1,1473 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class NodeV1Api(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 create_runtime_class(self, body, **kwargs): # noqa: E501
+ """create_runtime_class # noqa: E501
+
+ create a RuntimeClass # 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_runtime_class(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1RuntimeClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RuntimeClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_runtime_class_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_runtime_class # noqa: E501
+
+ create a RuntimeClass # 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_runtime_class_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1RuntimeClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_runtime_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RuntimeClass",
+ 201: "V1RuntimeClass",
+ 202: "V1RuntimeClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_runtime_class(self, **kwargs): # noqa: E501
+ """delete_collection_runtime_class # noqa: E501
+
+ delete collection of RuntimeClass # 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_runtime_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_runtime_class_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_runtime_class # noqa: E501
+
+ delete collection of RuntimeClass # 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_runtime_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_runtime_class(self, name, **kwargs): # noqa: E501
+ """delete_runtime_class # noqa: E501
+
+ delete a RuntimeClass # 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_runtime_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_runtime_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_runtime_class # noqa: E501
+
+ delete a RuntimeClass # 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_runtime_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_runtime_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_runtime_class(self, **kwargs): # noqa: E501
+ """list_runtime_class # noqa: E501
+
+ list or watch objects of kind RuntimeClass # 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_runtime_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RuntimeClassList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_runtime_class_with_http_info(**kwargs) # noqa: E501
+
+ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501
+ """list_runtime_class # noqa: E501
+
+ list or watch objects of kind RuntimeClass # 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_runtime_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RuntimeClassList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RuntimeClassList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_runtime_class(self, name, body, **kwargs): # noqa: E501
+ """patch_runtime_class # noqa: E501
+
+ partially update the specified RuntimeClass # 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_runtime_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RuntimeClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_runtime_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_runtime_class # noqa: E501
+
+ partially update the specified RuntimeClass # 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_runtime_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_runtime_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_runtime_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1RuntimeClass",
+ 201: "V1RuntimeClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_runtime_class(self, name, **kwargs): # noqa: E501
+ """read_runtime_class # noqa: E501
+
+ read the specified RuntimeClass # 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_runtime_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RuntimeClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_runtime_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_runtime_class # noqa: E501
+
+ read the specified RuntimeClass # 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_runtime_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_runtime_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RuntimeClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_runtime_class(self, name, body, **kwargs): # noqa: E501
+ """replace_runtime_class # noqa: E501
+
+ replace the specified RuntimeClass # 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_runtime_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1RuntimeClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RuntimeClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_runtime_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_runtime_class # noqa: E501
+
+ replace the specified RuntimeClass # 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_runtime_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RuntimeClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1RuntimeClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_runtime_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_runtime_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_runtime_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RuntimeClass",
+ 201: "V1RuntimeClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/openid_api.py b/kubernetes_asyncio/client/api/openid_api.py
new file mode 100644
index 0000000000..0a75c25bbf
--- /dev/null
+++ b/kubernetes_asyncio/client/api/openid_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class OpenidApi(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 get_service_account_issuer_open_id_keyset(self, **kwargs): # noqa: E501
+ """get_service_account_issuer_open_id_keyset # noqa: E501
+
+ get service account issuer OpenID JSON Web Key Set (contains public token verification keys) # 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_service_account_issuer_open_id_keyset(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: str
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_service_account_issuer_open_id_keyset_with_http_info(**kwargs) # noqa: E501
+
+ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # noqa: E501
+ """get_service_account_issuer_open_id_keyset # noqa: E501
+
+ get service account issuer OpenID JSON Web Key Set (contains public token verification keys) # 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_service_account_issuer_open_id_keyset_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_service_account_issuer_open_id_keyset" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/jwk-set+json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "str",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/openid/v1/jwks', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/policy_api.py b/kubernetes_asyncio/client/api/policy_api.py
new file mode 100644
index 0000000000..52c0407c6e
--- /dev/null
+++ b/kubernetes_asyncio/client/api/policy_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class PolicyApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/policy_v1_api.py b/kubernetes_asyncio/client/api/policy_v1_api.py
new file mode 100644
index 0000000000..dd778f3601
--- /dev/null
+++ b/kubernetes_asyncio/client/api/policy_v1_api.py
@@ -0,0 +1,2292 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class PolicyV1Api(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 create_namespaced_pod_disruption_budget(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_pod_disruption_budget # noqa: E501
+
+ create a PodDisruptionBudget # 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_disruption_budget(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_pod_disruption_budget_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_pod_disruption_budget # noqa: E501
+
+ create a PodDisruptionBudget # 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_disruption_budget_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_disruption_budget`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 201: "V1PodDisruptionBudget",
+ 202: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_pod_disruption_budget(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_pod_disruption_budget # noqa: E501
+
+ delete collection of PodDisruptionBudget # 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_disruption_budget(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_pod_disruption_budget_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_pod_disruption_budget # noqa: E501
+
+ delete collection of PodDisruptionBudget # 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_disruption_budget_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_disruption_budget`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_pod_disruption_budget # noqa: E501
+
+ delete a PodDisruptionBudget # 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_disruption_budget(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_pod_disruption_budget_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_pod_disruption_budget # noqa: E501
+
+ delete a PodDisruptionBudget # 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_disruption_budget_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_disruption_budget`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_pod_disruption_budget(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_pod_disruption_budget # noqa: E501
+
+ list or watch objects of kind PodDisruptionBudget # 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_disruption_budget(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudgetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_pod_disruption_budget_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_pod_disruption_budget # noqa: E501
+
+ list or watch objects of kind PodDisruptionBudget # 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_disruption_budget_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_disruption_budget`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudgetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_pod_disruption_budget_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_pod_disruption_budget_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind PodDisruptionBudget # 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_disruption_budget_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudgetList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_pod_disruption_budget_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_pod_disruption_budget_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind PodDisruptionBudget # 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_disruption_budget_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudgetList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/poddisruptionbudgets', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_pod_disruption_budget(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_disruption_budget # noqa: E501
+
+ partially update the specified PodDisruptionBudget # 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_disruption_budget(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_disruption_budget # noqa: E501
+
+ partially update the specified PodDisruptionBudget # 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_disruption_budget_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_disruption_budget`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 201: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_pod_disruption_budget_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_disruption_budget_status # noqa: E501
+
+ partially update status of the specified PodDisruptionBudget # 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_disruption_budget_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_pod_disruption_budget_status # noqa: E501
+
+ partially update status of the specified PodDisruptionBudget # 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_disruption_budget_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_disruption_budget_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_disruption_budget_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_disruption_budget_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 201: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_disruption_budget # noqa: E501
+
+ read the specified PodDisruptionBudget # 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_disruption_budget(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_pod_disruption_budget_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_disruption_budget # noqa: E501
+
+ read the specified PodDisruptionBudget # 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_disruption_budget_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_disruption_budget`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_pod_disruption_budget_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_disruption_budget_status # noqa: E501
+
+ read status of the specified PodDisruptionBudget # 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_disruption_budget_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_pod_disruption_budget_status # noqa: E501
+
+ read status of the specified PodDisruptionBudget # 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_disruption_budget_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_disruption_budget_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_disruption_budget_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_pod_disruption_budget(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_disruption_budget # noqa: E501
+
+ replace the specified PodDisruptionBudget # 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_disruption_budget(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_disruption_budget # noqa: E501
+
+ replace the specified PodDisruptionBudget # 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_disruption_budget_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_disruption_budget`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_disruption_budget`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 201: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_pod_disruption_budget_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_disruption_budget_status # noqa: E501
+
+ replace status of the specified PodDisruptionBudget # 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_disruption_budget_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1PodDisruptionBudget
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_pod_disruption_budget_status # noqa: E501
+
+ replace status of the specified PodDisruptionBudget # 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_disruption_budget_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the PodDisruptionBudget (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1PodDisruptionBudget
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_disruption_budget_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_disruption_budget_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_disruption_budget_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_disruption_budget_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1PodDisruptionBudget",
+ 201: "V1PodDisruptionBudget",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/rbac_authorization_api.py b/kubernetes_asyncio/client/api/rbac_authorization_api.py
new file mode 100644
index 0000000000..223002d848
--- /dev/null
+++ b/kubernetes_asyncio/client/api/rbac_authorization_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class RbacAuthorizationApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/rbac_authorization_v1_api.py b/kubernetes_asyncio/client/api/rbac_authorization_v1_api.py
new file mode 100644
index 0000000000..c3c6fde853
--- /dev/null
+++ b/kubernetes_asyncio/client/api/rbac_authorization_v1_api.py
@@ -0,0 +1,5947 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class RbacAuthorizationV1Api(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 create_cluster_role(self, body, **kwargs): # noqa: E501
+ """create_cluster_role # noqa: E501
+
+ create a ClusterRole # 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_cluster_role(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ClusterRole
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRole
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_cluster_role_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_cluster_role # noqa: E501
+
+ create a ClusterRole # 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_cluster_role_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ClusterRole
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRole",
+ 201: "V1ClusterRole",
+ 202: "V1ClusterRole",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_cluster_role_binding(self, body, **kwargs): # noqa: E501
+ """create_cluster_role_binding # noqa: E501
+
+ create a ClusterRoleBinding # 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_cluster_role_binding(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ClusterRoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_cluster_role_binding_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_cluster_role_binding # noqa: E501
+
+ create a ClusterRoleBinding # 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_cluster_role_binding_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ClusterRoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_binding" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_role_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRoleBinding",
+ 201: "V1ClusterRoleBinding",
+ 202: "V1ClusterRoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_role(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_role # noqa: E501
+
+ create a Role # 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_role(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Role
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Role
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_role_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_role # noqa: E501
+
+ create a Role # 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_role_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Role
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_role`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Role",
+ 201: "V1Role",
+ 202: "V1Role",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_role_binding(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_role_binding # noqa: E501
+
+ create a RoleBinding # 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_role_binding(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1RoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_role_binding_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_role_binding # noqa: E501
+
+ create a RoleBinding # 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_role_binding_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1RoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleBinding",
+ 201: "V1RoleBinding",
+ 202: "V1RoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_cluster_role(self, name, **kwargs): # noqa: E501
+ """delete_cluster_role # noqa: E501
+
+ delete a ClusterRole # 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_cluster_role(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_cluster_role_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_cluster_role # noqa: E501
+
+ delete a ClusterRole # 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_cluster_role_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_cluster_role_binding(self, name, **kwargs): # noqa: E501
+ """delete_cluster_role_binding # noqa: E501
+
+ delete a ClusterRoleBinding # 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_cluster_role_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_cluster_role_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_cluster_role_binding # noqa: E501
+
+ delete a ClusterRoleBinding # 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_cluster_role_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_role_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_cluster_role(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_role # noqa: E501
+
+ delete collection of ClusterRole # 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_cluster_role(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_cluster_role_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_role # noqa: E501
+
+ delete collection of ClusterRole # 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_cluster_role_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_cluster_role_binding(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_role_binding # noqa: E501
+
+ delete collection of ClusterRoleBinding # 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_cluster_role_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_cluster_role_binding_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_cluster_role_binding # noqa: E501
+
+ delete collection of ClusterRoleBinding # 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_cluster_role_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_role(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_role # noqa: E501
+
+ delete collection of Role # 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_role(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_role_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_role # noqa: E501
+
+ delete collection of Role # 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_role_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_role_binding(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_role_binding # noqa: E501
+
+ delete collection of RoleBinding # 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_role_binding(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_role_binding_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_role_binding # noqa: E501
+
+ delete collection of RoleBinding # 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_role_binding_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_role(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_role # noqa: E501
+
+ delete a Role # 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_role(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_role_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_role # noqa: E501
+
+ delete a Role # 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_role_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_role`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_role`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_role_binding # noqa: E501
+
+ delete a RoleBinding # 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_role_binding(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_role_binding_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_role_binding # noqa: E501
+
+ delete a RoleBinding # 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_role_binding_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 202: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cluster_role(self, **kwargs): # noqa: E501
+ """list_cluster_role # noqa: E501
+
+ list or watch objects of kind ClusterRole # 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_cluster_role(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cluster_role_with_http_info(**kwargs) # noqa: E501
+
+ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501
+ """list_cluster_role # noqa: E501
+
+ list or watch objects of kind ClusterRole # 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_cluster_role_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRoleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_cluster_role_binding(self, **kwargs): # noqa: E501
+ """list_cluster_role_binding # noqa: E501
+
+ list or watch objects of kind ClusterRoleBinding # 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_cluster_role_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_cluster_role_binding_with_http_info(**kwargs) # noqa: E501
+
+ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501
+ """list_cluster_role_binding # noqa: E501
+
+ list or watch objects of kind ClusterRoleBinding # 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_cluster_role_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRoleBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_role(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_role # noqa: E501
+
+ list or watch objects of kind Role # 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_role(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_role_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_role # noqa: E501
+
+ list or watch objects of kind Role # 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_role_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'namespace' in local_var_params:
+ path_params['namespace'] = local_var_params['namespace'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_role_binding(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_role_binding # noqa: E501
+
+ list or watch objects of kind RoleBinding # 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_role_binding(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_role_binding_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_role_binding # noqa: E501
+
+ list or watch objects of kind RoleBinding # 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_role_binding_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_role_binding_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_role_binding_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind RoleBinding # 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_role_binding_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBindingList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_role_binding_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_role_binding_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind RoleBinding # 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_role_binding_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_binding_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleBindingList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/rolebindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_role_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_role_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Role # 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_role_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_role_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_role_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind Role # 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_role_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/roles', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_role(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_role # noqa: E501
+
+ partially update the specified ClusterRole # 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_cluster_role(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRole
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_role_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_role # noqa: E501
+
+ partially update the specified ClusterRole # 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_cluster_role_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_role`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ClusterRole",
+ 201: "V1ClusterRole",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_cluster_role_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_role_binding # noqa: E501
+
+ partially update the specified ClusterRoleBinding # 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_cluster_role_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_cluster_role_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_cluster_role_binding # noqa: E501
+
+ partially update the specified ClusterRoleBinding # 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_cluster_role_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_role_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_role_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ClusterRoleBinding",
+ 201: "V1ClusterRoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_role # noqa: E501
+
+ partially update the specified Role # 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_role(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Role
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_role_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_role # noqa: E501
+
+ partially update the specified Role # 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_role_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_role`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_role`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_role`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1Role",
+ 201: "V1Role",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_role_binding(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_role_binding # noqa: E501
+
+ partially update the specified RoleBinding # 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_role_binding(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_role_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_role_binding # noqa: E501
+
+ partially update the specified RoleBinding # 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_role_binding_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1RoleBinding",
+ 201: "V1RoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_cluster_role(self, name, **kwargs): # noqa: E501
+ """read_cluster_role # noqa: E501
+
+ read the specified ClusterRole # 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_cluster_role(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRole
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_cluster_role_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_cluster_role # noqa: E501
+
+ read the specified ClusterRole # 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_cluster_role_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRole",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_cluster_role_binding(self, name, **kwargs): # noqa: E501
+ """read_cluster_role_binding # noqa: E501
+
+ read the specified ClusterRoleBinding # 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_cluster_role_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_cluster_role_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_cluster_role_binding # noqa: E501
+
+ read the specified ClusterRoleBinding # 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_cluster_role_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_role_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_role(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_role # noqa: E501
+
+ read the specified Role # 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_role(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Role
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_role_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_role # noqa: E501
+
+ read the specified Role # 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_role_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_role`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_role`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Role",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_role_binding # noqa: E501
+
+ read the specified RoleBinding # 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_role_binding(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_role_binding_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_role_binding # noqa: E501
+
+ read the specified RoleBinding # 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_role_binding_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_role(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_role # noqa: E501
+
+ replace the specified ClusterRole # 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_cluster_role(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ClusterRole
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRole
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_role_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_role # noqa: E501
+
+ replace the specified ClusterRole # 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_cluster_role_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRole (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ClusterRole
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_role`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_role`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRole",
+ 201: "V1ClusterRole",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_cluster_role_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_role_binding # noqa: E501
+
+ replace the specified ClusterRoleBinding # 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_cluster_role_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ClusterRoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ClusterRoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_cluster_role_binding_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_cluster_role_binding # noqa: E501
+
+ replace the specified ClusterRoleBinding # 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_cluster_role_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ClusterRoleBinding (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ClusterRoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_cluster_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_role_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_role_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ClusterRoleBinding",
+ 201: "V1ClusterRoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_role # noqa: E501
+
+ replace the specified Role # 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_role(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Role
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Role
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_role_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_role # noqa: E501
+
+ replace the specified Role # 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_role_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the Role (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1Role
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_role`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_role`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_role`") # 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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Role",
+ 201: "V1Role",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_role_binding(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_role_binding # noqa: E501
+
+ replace the specified RoleBinding # 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_role_binding(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1RoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1RoleBinding
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_role_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_role_binding # noqa: E501
+
+ replace the specified RoleBinding # 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_role_binding_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the RoleBinding (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1RoleBinding
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_role_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_role_binding`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_role_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1RoleBinding",
+ 201: "V1RoleBinding",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/resource_api.py b/kubernetes_asyncio/client/api/resource_api.py
new file mode 100644
index 0000000000..f267bd8c36
--- /dev/null
+++ b/kubernetes_asyncio/client/api/resource_api.py
@@ -0,0 +1,165 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ResourceApi(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 get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIGroup
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # 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_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_group" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1APIGroup",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/resource_v1_api.py b/kubernetes_asyncio/client/api/resource_v1_api.py
new file mode 100644
index 0000000000..fb99d9a6e6
--- /dev/null
+++ b/kubernetes_asyncio/client/api/resource_v1_api.py
@@ -0,0 +1,6491 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ResourceV1Api(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 create_device_class(self, body, **kwargs): # noqa: E501
+ """create_device_class # noqa: E501
+
+ create a DeviceClass # 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_device_class(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_device_class_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_device_class # noqa: E501
+
+ create a DeviceClass # 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_device_class_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeviceClass",
+ 201: "V1DeviceClass",
+ 202: "V1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim # noqa: E501
+
+ create a ResourceClaim # 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_claim(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim # noqa: E501
+
+ create a ResourceClaim # 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_claim_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 201: "ResourceV1ResourceClaim",
+ 202: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_template # noqa: E501
+
+ create a ResourceClaimTemplate # 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_claim_template(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_template # noqa: E501
+
+ create a ResourceClaimTemplate # 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_claim_template_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplate",
+ 201: "V1ResourceClaimTemplate",
+ 202: "V1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_resource_slice(self, body, **kwargs): # noqa: E501
+ """create_resource_slice # noqa: E501
+
+ create a ResourceSlice # 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_resource_slice(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_resource_slice # noqa: E501
+
+ create a ResourceSlice # 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_resource_slice_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceSlice",
+ 201: "V1ResourceSlice",
+ 202: "V1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_device_class(self, **kwargs): # noqa: E501
+ """delete_collection_device_class # noqa: E501
+
+ delete collection of DeviceClass # 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_device_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_device_class_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_device_class_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_device_class # noqa: E501
+
+ delete collection of DeviceClass # 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_device_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim # noqa: E501
+
+ delete collection of ResourceClaim # 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_claim(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim # noqa: E501
+
+ delete collection of ResourceClaim # 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_claim_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_template # noqa: E501
+
+ delete collection of ResourceClaimTemplate # 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_claim_template(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_template # noqa: E501
+
+ delete collection of ResourceClaimTemplate # 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_claim_template_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_resource_slice(self, **kwargs): # noqa: E501
+ """delete_collection_resource_slice # noqa: E501
+
+ delete collection of ResourceSlice # 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_resource_slice(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_resource_slice # noqa: E501
+
+ delete collection of ResourceSlice # 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_resource_slice_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_device_class(self, name, **kwargs): # noqa: E501
+ """delete_device_class # noqa: E501
+
+ delete a DeviceClass # 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_device_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_device_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_device_class # noqa: E501
+
+ delete a DeviceClass # 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_device_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeviceClass",
+ 202: "V1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim # noqa: E501
+
+ delete a ResourceClaim # 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_claim(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim # noqa: E501
+
+ delete a ResourceClaim # 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_claim_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 202: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim_template # noqa: E501
+
+ delete a ResourceClaimTemplate # 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_claim_template(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim_template # noqa: E501
+
+ delete a ResourceClaimTemplate # 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_claim_template_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplate",
+ 202: "V1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_resource_slice(self, name, **kwargs): # noqa: E501
+ """delete_resource_slice # noqa: E501
+
+ delete a ResourceSlice # 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_resource_slice(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_resource_slice_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_resource_slice # noqa: E501
+
+ delete a ResourceSlice # 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_resource_slice_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceSlice",
+ 202: "V1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_device_class(self, **kwargs): # noqa: E501
+ """list_device_class # noqa: E501
+
+ list or watch objects of kind DeviceClass # 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_device_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClassList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_device_class_with_http_info(**kwargs) # noqa: E501
+
+ def list_device_class_with_http_info(self, **kwargs): # noqa: E501
+ """list_device_class # noqa: E501
+
+ list or watch objects of kind DeviceClass # 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_device_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClassList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeviceClassList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim # noqa: E501
+
+ list or watch objects of kind ResourceClaim # 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_claim(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim # noqa: E501
+
+ list or watch objects of kind ResourceClaim # 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_claim_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim_template # noqa: E501
+
+ list or watch objects of kind ResourceClaimTemplate # 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_claim_template(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim_template # noqa: E501
+
+ list or watch objects of kind ResourceClaimTemplate # 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_claim_template_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_resource_claim_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_resource_claim_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaim # 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_claim_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_resource_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_resource_claim_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaim # 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_claim_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceclaims', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_resource_claim_template_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaimTemplate # 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_claim_template_for_all_namespaces(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplateList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_resource_claim_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_resource_claim_template_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaimTemplate # 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_claim_template_for_all_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_template_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplateList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceclaimtemplates', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_resource_slice(self, **kwargs): # noqa: E501
+ """list_resource_slice # noqa: E501
+
+ list or watch objects of kind ResourceSlice # 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_slice(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSliceList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_resource_slice_with_http_info(**kwargs) # noqa: E501
+
+ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501
+ """list_resource_slice # noqa: E501
+
+ list or watch objects of kind ResourceSlice # 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_slice_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSliceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_slice" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceSliceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_device_class(self, name, body, **kwargs): # noqa: E501
+ """patch_device_class # noqa: E501
+
+ partially update the specified DeviceClass # 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_device_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_device_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_device_class # noqa: E501
+
+ partially update the specified DeviceClass # 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_device_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1DeviceClass",
+ 201: "V1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim # noqa: E501
+
+ partially update the specified ResourceClaim # 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_claim(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim # noqa: E501
+
+ partially update the specified ResourceClaim # 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_claim_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 201: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_status # noqa: E501
+
+ partially update status of the specified ResourceClaim # 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_claim_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_status # noqa: E501
+
+ partially update status of the specified ResourceClaim # 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_claim_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 201: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_template # noqa: E501
+
+ partially update the specified ResourceClaimTemplate # 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_claim_template(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_template # noqa: E501
+
+ partially update the specified ResourceClaimTemplate # 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_claim_template_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplate",
+ 201: "V1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_resource_slice(self, name, body, **kwargs): # noqa: E501
+ """patch_resource_slice # noqa: E501
+
+ partially update the specified ResourceSlice # 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_resource_slice(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_resource_slice # noqa: E501
+
+ partially update the specified ResourceSlice # 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_resource_slice_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1ResourceSlice",
+ 201: "V1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_device_class(self, name, **kwargs): # noqa: E501
+ """read_device_class # noqa: E501
+
+ read the specified DeviceClass # 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_device_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_device_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_device_class # noqa: E501
+
+ read the specified DeviceClass # 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_device_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim # noqa: E501
+
+ read the specified ResourceClaim # 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_claim(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim # noqa: E501
+
+ read the specified ResourceClaim # 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_claim_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_status # noqa: E501
+
+ read status of the specified ResourceClaim # 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_claim_status(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_resource_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_status # noqa: E501
+
+ read status of the specified ResourceClaim # 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_claim_status_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_template # noqa: E501
+
+ read the specified ResourceClaimTemplate # 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_claim_template(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_template # noqa: E501
+
+ read the specified ResourceClaimTemplate # 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_claim_template_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_resource_slice(self, name, **kwargs): # noqa: E501
+ """read_resource_slice # noqa: E501
+
+ read the specified ResourceSlice # 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_resource_slice(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_resource_slice_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_resource_slice # noqa: E501
+
+ read the specified ResourceSlice # 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_resource_slice_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_device_class(self, name, body, **kwargs): # noqa: E501
+ """replace_device_class # noqa: E501
+
+ replace the specified DeviceClass # 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_device_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_device_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_device_class # noqa: E501
+
+ replace the specified DeviceClass # 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_device_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1DeviceClass",
+ 201: "V1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim # noqa: E501
+
+ replace the specified ResourceClaim # 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_claim(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim # noqa: E501
+
+ replace the specified ResourceClaim # 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_claim_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 201: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_status # noqa: E501
+
+ replace status of the specified ResourceClaim # 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_claim_status(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: ResourceV1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_status # noqa: E501
+
+ replace status of the specified ResourceClaim # 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_claim_status_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: ResourceV1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "ResourceV1ResourceClaim",
+ 201: "ResourceV1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_template # noqa: E501
+
+ replace the specified ResourceClaimTemplate # 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_claim_template(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_template # noqa: E501
+
+ replace the specified ResourceClaimTemplate # 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_claim_template_with_http_info(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaimTemplate (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceClaimTemplate",
+ 201: "V1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_resource_slice(self, name, body, **kwargs): # noqa: E501
+ """replace_resource_slice # noqa: E501
+
+ replace the specified ResourceSlice # 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_resource_slice(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_resource_slice # noqa: E501
+
+ replace the specified ResourceSlice # 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_resource_slice_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceSlice (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1ResourceSlice",
+ 201: "V1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/resourceslices/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/resource_v1alpha3_api.py b/kubernetes_asyncio/client/api/resource_v1alpha3_api.py
new file mode 100644
index 0000000000..3aab706b2b
--- /dev/null
+++ b/kubernetes_asyncio/client/api/resource_v1alpha3_api.py
@@ -0,0 +1,1987 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ResourceV1alpha3Api(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 create_device_taint_rule(self, body, **kwargs): # noqa: E501
+ """create_device_taint_rule # noqa: E501
+
+ create a DeviceTaintRule # 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_device_taint_rule(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_device_taint_rule_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_device_taint_rule_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_device_taint_rule # noqa: E501
+
+ create a DeviceTaintRule # 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_device_taint_rule_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_device_taint_rule`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 201: "V1alpha3DeviceTaintRule",
+ 202: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_device_taint_rule(self, **kwargs): # noqa: E501
+ """delete_collection_device_taint_rule # noqa: E501
+
+ delete collection of DeviceTaintRule # 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_device_taint_rule(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_device_taint_rule_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_device_taint_rule # noqa: E501
+
+ delete collection of DeviceTaintRule # 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_device_taint_rule_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_device_taint_rule(self, name, **kwargs): # noqa: E501
+ """delete_device_taint_rule # noqa: E501
+
+ delete a DeviceTaintRule # 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_device_taint_rule(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_device_taint_rule_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_device_taint_rule # noqa: E501
+
+ delete a DeviceTaintRule # 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_device_taint_rule_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_device_taint_rule`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 202: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1APIResourceList
+ """
+ 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: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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 = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1APIResourceList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def list_device_taint_rule(self, **kwargs): # noqa: E501
+ """list_device_taint_rule # noqa: E501
+
+ list or watch objects of kind DeviceTaintRule # 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_device_taint_rule(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRuleList
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_device_taint_rule_with_http_info(**kwargs) # noqa: E501
+
+ def list_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501
+ """list_device_taint_rule # noqa: E501
+
+ list or watch objects of kind DeviceTaintRule # 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_device_taint_rule_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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.
+ :type allow_watch_bookmarks: bool
+ :param _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.
+ :type _continue: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :type watch: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRuleList, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if local_var_params.get('watch') is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRuleList",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_device_taint_rule(self, name, body, **kwargs): # noqa: E501
+ """patch_device_taint_rule # noqa: E501
+
+ partially update the specified DeviceTaintRule # 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_device_taint_rule(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_device_taint_rule_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_device_taint_rule # noqa: E501
+
+ partially update the specified DeviceTaintRule # 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_device_taint_rule_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_device_taint_rule`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_device_taint_rule`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 201: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def patch_device_taint_rule_status(self, name, body, **kwargs): # noqa: E501
+ """patch_device_taint_rule_status # noqa: E501
+
+ partially update status of the specified DeviceTaintRule # 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_device_taint_rule_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_device_taint_rule_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_device_taint_rule_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_device_taint_rule_status # noqa: E501
+
+ partially update status of the specified DeviceTaintRule # 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_device_taint_rule_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: object
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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).
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param 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.
+ :type force: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_device_taint_rule_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_device_taint_rule_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if local_var_params.get('force') is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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`
+ content_types_list = local_var_params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'],
+ 'PATCH', body_params)) # noqa: E501
+ if content_types_list:
+ header_params['Content-Type'] = content_types_list
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 201: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_device_taint_rule(self, name, **kwargs): # noqa: E501
+ """read_device_taint_rule # noqa: E501
+
+ read the specified DeviceTaintRule # 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_device_taint_rule(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_device_taint_rule_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_device_taint_rule # noqa: E501
+
+ read the specified DeviceTaintRule # 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_device_taint_rule_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_device_taint_rule`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def read_device_taint_rule_status(self, name, **kwargs): # noqa: E501
+ """read_device_taint_rule_status # noqa: E501
+
+ read status of the specified DeviceTaintRule # 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_device_taint_rule_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_device_taint_rule_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_device_taint_rule_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_device_taint_rule_status # noqa: E501
+
+ read status of the specified DeviceTaintRule # 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_device_taint_rule_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_device_taint_rule_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_device_taint_rule(self, name, body, **kwargs): # noqa: E501
+ """replace_device_taint_rule # noqa: E501
+
+ replace the specified DeviceTaintRule # 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_device_taint_rule(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_device_taint_rule_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_device_taint_rule # noqa: E501
+
+ replace the specified DeviceTaintRule # 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_device_taint_rule_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_device_taint_rule`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_device_taint_rule`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 201: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def replace_device_taint_rule_status(self, name, body, **kwargs): # noqa: E501
+ """replace_device_taint_rule_status # noqa: E501
+
+ replace status of the specified DeviceTaintRule # 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_device_taint_rule_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1alpha3DeviceTaintRule
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_device_taint_rule_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_device_taint_rule_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_device_taint_rule_status # noqa: E501
+
+ replace status of the specified DeviceTaintRule # 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_device_taint_rule_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceTaintRule (required)
+ :type name: str
+ :param body: (required)
+ :type body: V1alpha3DeviceTaintRule
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_taint_rule_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_device_taint_rule_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_device_taint_rule_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1alpha3DeviceTaintRule",
+ 201: "V1alpha3DeviceTaintRule",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
diff --git a/kubernetes_asyncio/client/api/resource_v1beta1_api.py b/kubernetes_asyncio/client/api/resource_v1beta1_api.py
new file mode 100644
index 0000000000..e636cd6b65
--- /dev/null
+++ b/kubernetes_asyncio/client/api/resource_v1beta1_api.py
@@ -0,0 +1,6491 @@
+# 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.35
+ 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_asyncio.client.api_client import ApiClient
+from kubernetes_asyncio.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class ResourceV1beta1Api(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 create_device_class(self, body, **kwargs): # noqa: E501
+ """create_device_class # noqa: E501
+
+ create a DeviceClass # 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_device_class(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_device_class_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_device_class # noqa: E501
+
+ create a DeviceClass # 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_device_class_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1DeviceClass
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1DeviceClass",
+ 201: "V1beta1DeviceClass",
+ 202: "V1beta1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/deviceclasses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim # noqa: E501
+
+ create a ResourceClaim # 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_claim(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim # noqa: E501
+
+ create a ResourceClaim # 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_claim_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1ResourceClaim
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ResourceClaim",
+ 201: "V1beta1ResourceClaim",
+ 202: "V1beta1ResourceClaim",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_template # noqa: E501
+
+ create a ResourceClaimTemplate # 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_claim_template(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ResourceClaimTemplate
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_template # noqa: E501
+
+ create a ResourceClaimTemplate # 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_claim_template_with_http_info(namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param body: (required)
+ :type body: V1beta1ResourceClaimTemplate
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ResourceClaimTemplate",
+ 201: "V1beta1ResourceClaimTemplate",
+ 202: "V1beta1ResourceClaimTemplate",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def create_resource_slice(self, body, **kwargs): # noqa: E501
+ """create_resource_slice # noqa: E501
+
+ create a ResourceSlice # 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_resource_slice(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ResourceSlice
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_resource_slice # noqa: E501
+
+ create a ResourceSlice # 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_resource_slice_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ResourceSlice
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type field_manager: str
+ :param 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.
+ :type field_validation: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % 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 local_var_params.get('body') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_manager') is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if local_var_params.get('field_validation') is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1ResourceSlice",
+ 201: "V1beta1ResourceSlice",
+ 202: "V1beta1ResourceSlice",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/resourceslices', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_device_class(self, **kwargs): # noqa: E501
+ """delete_collection_device_class # noqa: E501
+
+ delete collection of DeviceClass # 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_device_class(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_device_class_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_device_class_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_device_class # noqa: E501
+
+ delete collection of DeviceClass # 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_device_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/deviceclasses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim # noqa: E501
+
+ delete collection of ResourceClaim # 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_claim(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim # noqa: E501
+
+ delete collection of ResourceClaim # 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_claim_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_template # noqa: E501
+
+ delete collection of ResourceClaimTemplate # 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_claim_template(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_template # noqa: E501
+
+ delete collection of ResourceClaimTemplate # 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_claim_template_with_http_info(namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_claim_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 local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_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 local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_collection_resource_slice(self, **kwargs): # noqa: E501
+ """delete_collection_resource_slice # noqa: E501
+
+ delete collection of ResourceSlice # 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_resource_slice(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1Status
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_resource_slice # noqa: E501
+
+ delete collection of ResourceSlice # 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_resource_slice_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param _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.
+ :type _continue: str
+ :param 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
+ :type dry_run: str
+ :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :type field_selector: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :type label_selector: str
+ :param 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.
+ :type limit: int
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param 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
+ :type resource_version: str
+ :param 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
+ :type resource_version_match: str
+ :param 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.
+ :type send_initial_events: bool
+ :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :type timeout_seconds: int
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_resource_slice" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('_continue') is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('field_selector') is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('label_selector') is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if local_var_params.get('limit') is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if local_var_params.get('resource_version') is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if local_var_params.get('resource_version_match') is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if local_var_params.get('send_initial_events') is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if local_var_params.get('timeout_seconds') is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1Status",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/resourceslices', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_device_class(self, name, **kwargs): # noqa: E501
+ """delete_device_class # noqa: E501
+
+ delete a DeviceClass # 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_device_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1DeviceClass
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_device_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_device_class # noqa: E501
+
+ delete a DeviceClass # 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_device_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the DeviceClass (required)
+ :type name: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_device_class" % 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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if local_var_params.get('pretty') is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if local_var_params.get('dry_run') is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if local_var_params.get('grace_period_seconds') is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if local_var_params.get('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 local_var_params.get('orphan_dependents') is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if local_var_params.get('propagation_policy') is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = dict(local_var_params.get('_headers', {}))
+
+ 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
+
+ response_types_map = {
+ 200: "V1beta1DeviceClass",
+ 202: "V1beta1DeviceClass",
+ 401: None,
+ }
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_types_map=response_types_map,
+ 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,
+ _request_auth=local_var_params.get('_request_auth'))
+
+ def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim # noqa: E501
+
+ delete a ResourceClaim # 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_claim(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ResourceClaim
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim # noqa: E501
+
+ delete a ResourceClaim # 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_claim_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param name: name of the ResourceClaim (required)
+ :type name: str
+ :param namespace: object name and auth scope, such as for teams and projects (required)
+ :type namespace: str
+ :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :type pretty: str
+ :param 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
+ :type dry_run: str
+ :param 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.
+ :type grace_period_seconds: int
+ :param 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
+ :type ignore_store_read_error_with_cluster_breaking_potential: bool
+ :param 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.
+ :type orphan_dependents: bool
+ :param 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.
+ :type propagation_policy: str
+ :param body:
+ :type body: V1DeleteOptions
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ 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',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ 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_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 local_var_params.get('name') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim`") # noqa: E501
+
+ collection_formats = {}
+
+ path_p